Developers

Filter Posts by Primary Tag or Section

Filter Posts by Primary Tag or Section

It's now possible to filter the Posts element in our Layout & Design tool by primary tags and primary sections. For now, this is only possible via XML attributes on the Posts element.

Below are the new attributes that allow you to filter by primary tags or sections, and how to use them.


Filtering by Primary Section

Examples:

<posts
    ...
    from_primary_sections_of_current_post="true"
    from_primary_sections_other_than="politics,sport"
    ...
/>
<posts
    ...
    from_primary_sections_of_current_post_other_than="news"
    from_primary_sections_other_than="politics,sport"
    ...
/>
<posts
    ...
    from_primary_sections="news"
    from_primary_sections_other_than="politics,sport"
    ...
/>

Attributes:

      from_primary_sections_of_current_post
      
      • Allows you to include posts by the primary section of the current post
      • Can be true or false
      from_primary_sections_of_current_post_other_than
      
      • Allows you to include posts by the primary section of the current post, other than the specified ones
      • Can be a comma separated list of section slugs
      • Can be a skeleton expression
      from_primary_sections
      
      • Allows you to include posts by specific primary sections
      • Can be a comma separated list of section slugs
      • Can be a skeleton expression
      from_primary_sections_other_than
      
      • Allows you to exclude posts by specific primary sections
      • Can be a comma separated list of section slugs
      • Can be a skeleton expression

      Filtering by Primary Tag

      Examples:

      <posts
          ...
          from_primary_tags_of_current_post="true"
          from_primary_tags_other_than="politics,sport"
          ...
      />
      
      <posts
          ...
          from_primary_tags="news"
          from_primary_tags_other_than="politics,sport"
          ...
      />
      

      Attributes:

        from_primary_tags_of_current_post
        
        • Allows you to include posts by the primary tag of the current post
        • Can be true or false
        from_primary_tags
        
        • Allows you to include posts by specific primary tags
        • Can be a comma separated list of tags
        • Can be a skeleton expression
        from_primary_tags_other_than
        
        • Allows you to exclude posts by specific primary tags
        • Can be a comma separated list of tags
        • Can be a skeleton expression

        The full documentation on our API for Posts element filtering can be found here. If you have any questions, feel free to reach out to your account manager or our Support team at support@rebelmouse.com.

        What Is RebelMouse?
        Request a Proposal
        subscription model for publishers
        Rebel Insights

        In 2023, Publishers Take Back Control With Subscription Success

        Users are ready to pay for content that delivers

        The Rise of the Mature User

        It's been a long and winding path, but in 2023 the subscription model continues its upward trajectory as a top revenue strategy for publishers of all sizes. The tug of war between platforms and publishers reached its peak in the last few years of the previous decade, leaving users desperate for a modern user experience that's clear of any clutter from the duopoly that is Google and Facebook. This is why intelligent paywall models are a top choice for users looking to consume content right from the source. When done correctly, the strategy can work for any type of media. The New York Times, a frequent showpiece example of the power of paywalls, is constantly reporting record-busting subscription numbers, with 7.6 million digital subscriptions in 2021.

        And it all makes perfect sense. The subscription model eliminates the middleman — such as the platforms — so readers get the experience and content they want, and publishers get the cash they need.

        Keep reading...Show less
        The Most Secure CMS of 2023
        Featured

        The Most Secure CMS of 2023

        Why RebelMouse Is the Most Secure CMS on the Web

        Delivering a secure, high-performing environment with extreme reliability is essential to all of our clients at RebelMouse. We only use industry-leading, reliable approaches to host our infrastructure. This ensures maximum stability and security for all of our clients’ data. Here are just some of the reasons we’re able to maintain a hard-bodied product that’s flexible, too.

        Keep reading...Show less
        Interested in a Free Website Health Check?Check Your
        Website's Health
        Get Your Free Analysis Now