• Hi all!

    I have a website set up using WordPress, and I have a blog feed coming in on my homepage as default. I want to have another two feeds on my website, both on different ‘pages’, that filter the blog by category.

    So for example, I want a page with ‘news’ coming in, a page for ‘events’ and the regular blog stream on the homepage, which is also limited to show only one category.

    Can anyone point me in the right direction to get this done?

    Thanks guys ??

Viewing 1 replies (of 1 total)
  • You need to create a couple of extra pages in the admin (and make a note of there IDs, found in the URI when editing the page) and then add an agrument for the correct category at the top of the ‘index.php’ template. Something like this should work, assuming that you are using wp_query($args) to retrieve the correct posts –

    if(is_page($news_page_id)) :
        $args['category'] = 'news';
    elseif() :
        $args['category'] = 'events';
    else : // Your usual index, so set a category if needed.
        $args['category'] = 'some-other-cat';
    endif;
Viewing 1 replies (of 1 total)
  • The topic ‘One blog, three pages many categories’ is closed to new replies.