mrlarter
Member
Posted 8 years ago #
I know with b2 in a way you can have multiple blogs via the catagories.
I was wondering if this was possible with WP.
basically waht I am wanting is on one page one group off catagories to appear and on another page a diffrent group of catagories to appear.
any suggestions?
It's not terribly diffilcult to do. Just have to seperate installations of WP, give them the same database connection information, and edit one of the blog.header.php files to show only one category, such as adding "AND post_category = 3" or whatever category you want it to show.
mrlarter
Member
Posted 8 years ago #
I wouldn't even new a new installation would I? simply making a second b2.php file and naming it diffrent wouldn' that suffice?
If it was in the same directory, that would be just groovy.
Actually, then the modification to blog.header.php would mess things up though. The common sense thing to do would be add something like $cat = 1 to the top of your template, but because of the way things are set up right now that would show you every post in that category in one really long page.
mrlarter
Member
Posted 8 years ago #
what exactly do i need to add to the header?
the $cat=1?
mrlarter
Member
Posted 8 years ago #
the error given when I attempt this catagory selecting is this
Warning: Invalid argument supplied for foreach() in /home/ogham/public_html/wp/b2cat2.php on line 29
any suggestions to get a way around this?
That means you don't have any posts in that category yet. Post something and that should go away.
mrlarter
Member
Posted 8 years ago #
what if I wanted to have multiple catagories on one page? something like $cat=1,3,4?
For multiple cats, use: $cat='1 3 4';