Excuse me if this question is slightly unclear, as i'm having trouble working out the logic to it. On the feature section of my blog page - which can seen in the image attachment above. I am dragging data from the playa module to display feature previews of the most recently uploaded features posted onto the site.

The features on my site are separated into 6 category sections, energy, sport, sleep, wellness, perform, relax.

I want to display one of each of the most recently uploaded features from each category. for the example, one feature will display a post from the the sleep category, one form the energy category and so on...

This is want i have tagged in my template thus far.

{exp:playa:children field="feature_previews" limit="6"}
        <a href="{url_title_path='blog/full-post'}">
        <div class="featured-tab {url_title}"></div>
            <img src="{feature_assets}{feature_preview_image}{/feature_assets}" alt="placeholder"></a>

From the tagging above is there anything i need to add in the loop order differentiate category per post?

This demonstrates what i am trying to achieve


1 Answer 1


Playa's an odd solution for this problem, unless you're creating several pages that are linking to different sets of featured pages.

If the goal is to simply display the most recently created feature in each category, an easier, self-managing approach would be to just loop through your categories and display the most recent post from each:

{exp:channel:categories style="linear" category_group="1|2|3" channel="x" show_empty="no"}
    {exp:channel:entries dynamic="no" category="{category_id}" limit="1"}
       [all of your entry markup goes here]

There are other approaches you could take as well, depending on your content; you could also use a custom field, status, or another category to flag articles as "featured," and update the code above as appropriate.

  • Thanks, i'l give this method, i'm trying to create a blog, i guess you method is the most appropriate
    – NewBoy
    Dec 20, 2012 at 15:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.