Support » Fixing WordPress » How to keep only one category on the index page?

  • 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 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • Mark (podz)


    Support Maven

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

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

    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.

    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.

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

    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.

    Nice advice, thank you.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to keep only one category on the index page?’ is closed to new replies.