Forums

Different category posts on different pages? (5 posts)

  1. sophia8
    Member
    Posted 7 years ago #

    I would like to display posts in one catagory on a separate page, and not have them display on the main page; i.e. have all posts in the 'cheese' category appear only on the Cheese page.
    How do I achieve this?

  2. Mumble
    Member
    Posted 7 years ago #

    Try this tutorial: Faking it: WordPress as CMS pt. 1:

    <?php
    $cat="1 2 3 4 5 6 7";
    require('./wp-blog-header.php');
    ?>

    "What we have just done is tell the index page to load any content it finds in categories 1 -7, but to absolutely, positively ignore 8 - 10."

  3. sophia8
    Member
    Posted 7 years ago #

    Thanks for that! That looks like what I want, and it's pretty simple to implement, too. I'll give it a go.

  4. Lorelle
    Member
    Posted 7 years ago #

    I've done what you want, but it is easier than the above code. You can easily create muliple category pages and then have only the posts within that category listed using the archive.php page as your base. It's incredibly easy and much better if you would like to "say something" special about each category, like "cheese is good for you and we have some interesting posts about cheese in this section."

  5. 7milesdown
    Member
    Posted 6 years ago #

    Lorelle, can you send me a working example of this, or display a working example of the page you created. Im very lost right now.

    I want to add a bodybuilding journal to my existing blog. like a link via the menu, which will take me to all the posts I make in my bodybuilding journal.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.