Subscribe to Our Newsletter

x

How to set up posts attributes?

You can always control the posts displayed from A .xml file. by using the following attributes with <posts> tag;

P.S : If you use <posts> tag without the source attribute, it will use the frontpage source as default.


<posts ... /> 

Here is a list of the attributes that you can use to control pulled out posts source

  • "limit" : Controls the number of posts pulled from source with these Attributes
<posts limit="10" ... /> 

In the example above, it only displays only 10 posts from the source

  • source_unique="true" :Excludes duplicates found in blocks .
<posts source_unique="true" ... /> 
  • source="current_page" :is converts into one of the following sources: tag, search_result or frontpage
<posts source="current_page" ... />
  • source="search_result" : When you use "search_result" attribute , it will display posts found by a search phrase from the request
<posts source="search_result" ... /> 
  • source="frontpage" : Displays posts from Home section
<posts source="frontpage"> 
  • source="frontpage" seciton_url="politics" Using "section_url" attribute along with "source" attribute it would show posts from the section URL added , like example below :
<posts source="frontpage" seciton_url="politics" ... />

Displays posts from Politics section on front page

  • source="frontpage" section_url="{{post.section}}" : displays posts from current post's primary section (or one of the secondary sections if not primary section defined).
<posts source="frontpage" section_url="{{post.section}}" ... />
  • source="saved" :Displays posts from those that user saved/liked (should have been liked but whatever)
<posts source="saved" ... />
  • source="tag" : displays posts with one of the tags matching tag from the request
<posts source="tag" ... /> 
  • source="tag" tag_name="example_tag" : displays posts with one of the tags matching "example_tag" tag
<posts source="tag" tag_name="example_tag" ... /> 
  • source="tag" order="primary" :displays posts with primary tag matching tag from the request Falls back to matching secondary tags.
<posts source="tag" order="primacy" ... /> 
  • source="popular" : displays posts ordered by pageviews from the last 1 hour.
<posts source="popular" ... /> 
  • source="popular" interval="6" unit="hour" : displays posts ordered by page-views from the last 6 hours
<posts source="popular" interval="6" unit="hour" ... /> 

-- (soon deprecated)

  • source="popular" period="6h" : displays posts ordered by page-views from the last 6 hours.
<posts source="popular" period="6h" ... /> 

-- (soon introduced)

  • source="popular" period="lifetime" : displays posts ordered by page-views from all time.
<posts source="popular" period="lifetime" ... /> 

-- (soon introduced)

  • source="popular" [sections_filter] : displays posts ordered by pageviews from the last 1 hour and filtered by sections (see below)
<posts source="popular" [sections_filter] ... />
  • source="related" : displays posts which tags match one of the tags of the current post. it falls back to posts which sections match primary section of current post.
<posts source="related" ... />

if you need to Disable the fallback

<posts source="related" no_fallback="true" />
  • source="related" [sections_filter] : displays posts which tags match one of the tags of the current post filtered by sections
<posts source="related" [sections_filter] ... /> 
  • source="related" from_tags_of_current_post="false" [sections_filter] : displays posts filtered by sections
<posts source="related" from_tags_of_current_post="false" [sections_filter] ... /> 
  • source="related" [tags_filter] : displays posts filtered by tags (see below)
<posts source="related" [tags_filter] ... />
  • source="related" [period_filter] : displays posts filtered by publishing date
<posts source="related" [period_filter] ... />
  • source="related" post_per_section="true" from_sections="politics,health-care" :

displays at most 2 posts -- one from Politics and one from Health Care

<posts source="related" post_per_section="true" from_sections="politics,health-care" ... />

Sections Filter:

  • from_sections_of_current_post="true" : keeps posts which sections match one of the current post's sections
<posts ... from_sections_of_current_post="true" ... />
  • from_sections_of_current_post_other_than="section_name"

keeps posts which sections match one of the current post's sections excluding those that are in section_name mentioned.

<posts ... from_sections_of_current_post_other_than="section_name" ... />
  • from_sections="section1, section2" : keeps posts from section1 and section2 sections
<posts ... from_sections="section1, section2" ... /> 
  • from_sections_other_than="section1, section2" : ignores posts from section1 and section2 sections
<posts ... from_sections_other_than="section1,section2" ... />
  • from_sections="section1" from_sections_other_than="section2" : keeps posts that are in section1 but not in section2
<posts ... from_sections="section1" from_sections_other_than="section2" ... />

Tags Filter:

  • from_tags_of_current_post="true" displays posts which tags match one of the tags of the current post (default behavior of related source)
<posts ... from_tags_of_current_post="true" ... /> 
  • from_tags="section1" displays posts which tags include "section1" tag

<posts ... from_tags="section1" ... />

  • from_tags_other_than="section1" : displays posts which tags do not include "section1" tag
<posts ... from_tags_other_than="section1" .../>

Period Filter:

  • interval="12" unit="day" : (soon deprecated) either used to define page-views period for popular source or publishing date for related source
<posts ... interval="12" unit="day" ... />
  • period="12d" : (soon introduced) either used to define PVs period for popular source or publishing date for related source
<posts ... period="12d" ... /> 
  • published_before_current_post="true" : Used in related source to keep only posts that are older than the current one.
<posts ... published_before_current_post="true" ... />

You're almost there! Fill out the form below and a Rebel will contact you within one business day.

x

A Look Inside the Only Creative Agency Powered by Deep Technology

Strategic development of product that supports content distribution, conversion, and loyalty.

RebelMouse is a creative agency fueled by a publishing platform with deep technology. Our expertise is rooted in media and content marketing because there is no other team that understands distributive publishing better than we do. There is also no other CMS on the market today that provides content creators with the tools they need to unlock sustainable growth backed by sticky monetization methods. RebelMouse blends product and strategy together to move the needle where it matters most — organic traffic and user growth, conversion to loyalty, and revenue growth.

Keep reading... Show less

New: Easily Remove Users + Transfer Content

We subscribe to the idea that we live in a universe filled with creators. With that said, not all creators are created equal, and sometimes they move on after a while. That's why we want to make sure our site administrators have complete control over who has access to their RebelMouse pages. We've launched a new user interface within our users dashboard that allows you to efficiently remove authors from your site. And during this process, you can also reallocate posts from one user to another in bulk. Here's a look at how it all works.

Keep reading... Show less

NEW: RebelMouse Native Comments with Notifications

Content creation is never static. To build an audience, it's important to ensure that your content is not only dynamic, but sparks a conversation.

Keep reading... Show less

You're almost there! Fill out the form below and a Rebel will contact you within one business day.

x

How to Add a Title to Section and Tag Pages

Sometimes you might find the need to put a title on a section page. Here's an example:

Here's how to do it:

Keep reading... Show less

Introducing New and Dynamic Styles in Particle Assembler

Content creators are the lifeblood of your web property and their time is precious. That's why at RebelMouse we're always looking to enhance the ways creators can shape their content into dynamic and engaging media.

Our Particle Assembler is an intuitive way to create stunning dev-free designs in just a few clicks. And now Assembler has more styles to make your content pop.

Keep reading... Show less