Anonymous
Unregistered
Posted 8 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 :)
Try a search for 'show one category' here.
You may need to make a 'welcome' category for it to show though.
Anonymous
Unregistered
Posted 8 years ago #
Many thanks.
This works for me:
<?php
$blog = 1;
$cat="1";
/* Don't remove this line. */
require('./wp-blog-header.php');
?>
Anonymous
Unregistered
Posted 8 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.
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
Anonymous
Unregistered
Posted 8 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.
Anonymous
Unregistered
Posted 8 years ago #