Only one category in center column
I want to display only one category in the center column, but I have not been able to figure out how to make it work.
My center column displays all categories in the site. |
You can set query_posts right before the "Loop" begins http://codex.wordpress.org/Template_Tags/query_posts
Put the code at the bottom of Style & edit CENTER COLUMN -> Content ABOVE the LOOP i.e. <?php query_posts('cat=12'); ?> |
Helpfull, but if I want to have a different categorie on different static pages? Then I glue in the above code into the text area of each page with the corresponding cat nr.?
|
You're basically replicating what's already built into WP, no? A category page when clicked would list all posts filed in that category.
The code for doing this with query_posts regardless would be <?php if ( is_page('Page Title') ) query_posts('cat=12'); if ( is_page('Other Page Title') ) query_posts('cat=22'); if ( is_page('Yet Page Title') ) query_posts('cat=32'); if ( is_page('One More Page Title') ) query_posts('cat=42'); ?> |
All times are GMT -6. The time now is 09:09 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.