How to keep only one category on the index page? (8 posts)

  1. Anonymous
    Posted 11 years ago #

    Just installed WP and liking it a lot. I've been trying to figure out one thing though and I am stumped. I want to use categories for navigation. I've removed the categories from the meta and have replaced them with navigation links which is working fine, thanks to list-o-matic.
    I would now like to have a generic welcome index.php page, from where the visitor can browse the categories but try as I might WP insists in publishing all cats on index.php. Or am I missing something insanely obvious. Which HAS happened before :)

  2. Mark (podz)
    Support Maven
    Posted 11 years ago #

    Try a search for 'show one category' here.
    You may need to make a 'welcome' category for it to show though.

  3. Anonymous
    Posted 11 years ago #

    Many thanks.
    This works for me:
    $blog = 1;
    /* Don't remove this line. */

  4. Anonymous
    Posted 11 years ago #

    Actually, scratch that. Not working at all, it now displays the same intro post that I only want to appear on index.php in each category and hides everything else, regardless of the category the post is tagged as. Grrrr. Serves me right for trying to make WP make things it obviously wasn't designed to do :)
    Onwards and upwards.

  5. joand
    Posted 11 years ago #

    Instead of $cat="1" put:
    if (!isset($cat)) {
    $cat = "1";

    Which I THINK means "if no category is selected, show category 1" rather than just "show category 1" which would override whatever category was acturally selected.
    I finally got this to work after much head bashing (with help here!) and looking at outdated info.

  6. joand
    Posted 11 years ago #

    Getting it to work I got the help with I meant - not the head bashing!!

  7. Anonymous
    Posted 11 years ago #

    Joan, you are my HERO. Thank you so much.
    This works. Maybe something to add to the next version? This takes WP from 'just' a blogging solution to a full blown CMS.
    Thanks again, I shall get going.

  8. Anonymous
    Posted 11 years ago #

    Nice advice, thank you.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.