I have a page that displays all entries in a "stories" channel. Each story is categorised and I need there to be an option to filter by these categories. Here is the code I currently have:

<div class="filter-stories">
    Filter stories by:
    {exp:channel:categories channel="stories" style="linear" show_empty="no"}
        <a href="#">{category_name}</a>

{exp:channel:entries channel="stories" dynamic="off"}
    <aricle class="story{switch='|| end'}" style="border:1px solid #000;width: 32%; float: left;">
        <img src="{story-hero}" style="width:100%;">
        <a href="{page_url}">read more</a>

Currently the list shows all the stories - which is how I want it to be by default, but how would I go about making the filter work. Ideally I want to click one of the category name links and it will only show the stories in that category without refreshing the page (using AJAX I assume?).

I've never used AJAX in ExpressionEngine, can I add to the channel entries tag with it or is there a different way to achieve this?

Thanks in advance.

1 Answer 1


There's a great 2-part walkthrough of a setup like this on the Meta Q site that would be worth a read.

  • You're very welcome. I love it when there's a step-by-step tutorial on how to do something. Makes life so much easier! Sep 10, 2013 at 16:53

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.