Okay, so after a few hours of hunting around, looking at various hacks and code, i’ve come up with a way to show the posts in a certain category. I think it’s alot easier to implement if, like me, you want to display the different category posts on one page, but have more than one category shown.
How you do it:
Add the WP-Loop code to a blank php file (no whitespaces!) in the way that you’d like to display your posts. Make sure there’s no <head> or <body> tags or anything like that. <meta> tags are fine, but no <body> or <head> tags, we need a plain php include file.
Okay, once you’ve got the display sorted, at the top of the file where you have:
$blog = 1;
Put “$cat = X” where X is the category ID of the category posts you want to show, ABOVE “$blog = 1”.
Now all you do is include the file into your index.php or whatever php page where you want it displayed like so: <?php include(‘your-include.php’);?>.
Hope this helps anybody who wants the same style system as me, even though it’s very dirty lol.
- The topic ‘Quick and Dirty category-post viewing!’ is closed to new replies.