• 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)
  • Try a search for ‘show one category’ here.
    You may need to make a ‘welcome’ category for it to show though.

    Thread Starter Anonymous

    Many thanks.
    This works for me:
    <?php
    $blog = 1;
    $cat=”1″;
    /* Don’t remove this line. */
    require(‘./wp-blog-header.php’);
    ?>

    Thread Starter Anonymous

    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.
    Joan

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

    Thread Starter Anonymous

    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.

    Thread Starter Anonymous

    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.