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

        Where 
        Websites Are Built

        The Fastest Sites in the World Run on RebelMouse

        Let’s Chat

        new!

        RebelMouse Performance Monitoring

        Real-Time Core Web Vitals

        Get Started
        DISCOVER MORE

        Our Core Features

        Our platform is a complete digital publishing toolbox that's built for modern-day content creators, and includes game-changing features such as our:

        animate
        Layout and Design toolLayout and Design tool on mobile
        animate

        Why RebelMouse?

        Unprecedented Scale

        RebelMouse sites reach more than 120M people a month, with an always-modern solution that combines cutting-edge technology with decades of media savvy. And due to our massive scale, 1 in 3 Americans have visited a website powered by RebelMouse.

        120M+ Users
        550M+ Pageviews
        17+ Avg. Minutes per User
        6+ Avg. Pages per User

        Today's Top Websites Use RebelMouse

        Thanks to the tremendous scale of our network, we are able to analyze a wealth of traffic data that informs our strategies and allows us to be a true strategic partner instead of just a vendor.

        upworthyindy100Vault12No Film SchoolRawStoryResponsible StatecraftPrideRolling Stone QuebecPremierGuitarPenskeINN Educate Brand ConnectThe FulcrumGZEROOkayafricaBrit+CoPaper MagazinePowerToFlyNarcityCommonDreamsAllBusiness

        What Clients Say

        We’re here to help you weigh and understand every tech and strategic decision that affects your digital presence. Spend less time managing everything yourself, and more time focused on creating the quality content your users deserve.

        Case Studies

        A Team (and an Agency) Built Like No Other

        RebelMouse employs a unique, diverse, and decentralized team that consists of 70+ digital traffic experts across more than 25 different countries. We have no central office, and we cover every time zone to ensure that we’re able to deliver amazing results and enterprise-grade support around the clock.

        Our team is well-versed in all things product, content, traffic, and revenue, and we strategically deploy ourselves to help with each element across all of our clients. We thrive on solving the complex.

        Let's Chat