jay64
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: how to add a second 'posts' page tou your blog?thanks for the link, although i must admit i did not fully understand everything.
from reading them and the query_posts section linked within one of the above links, i think i have an idea how to go about this.
Would this method work?:-do not set the homepage as static
-have two post categories; cat1 and cat2
-since i want both these categories to act differently i would need to modify/create separate files; edit the index.php to get the desired result on the homepage(only show cat1 posts instead of showing all the latest posts from all categories), then create and edit
category-id.php for cat2.
-in index.php i would enter a query_post excluding posts from other categories showing up. For example i only want cat1 posts on the home page so i enter this in index.php before ‘the loop’ to exclude posts from cat2:this:
<?php
if (is_home()) {query_posts(“cat=-2″);}?>before this (the loop):
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
-then i do the same for the category-id.php of cat2, except i slightly edit the above code to not display posts from cat1.
-then i make a custom menu make a label cat2 add the url link for cat2 and now cat2 will be on the top navigation; where a click will instantly take me to the cat2 page; which has all the cat2 posts but no posts from cat1. Then i can also click home where the homepage will show posts from cat1 but none from cat2(not even newest posts from cat2).
is my understanding and method correct, will this work? is the code as well as its positioning correct?
thank you for your help.
I’m just so new at this and not very good.any merciful helpers please?