dizzyvapor
Member
Posted 3 years ago #
My blog is setup to show only one post at a time on the index page, which is how I want it. I am creating an inner page where I want to show all posts within a certain category, yet it's only showing the most recent post from that category. How do I override the settings I have so that the inner page shows all posts in that category rather than 1 post like the homepage does?
Not sure if this is the answer you're looking for, but you will most likely have to edit your theme and use a wp function:
http://codex.wordpress.org/Template_Tags/get_posts
dizzyvapor
Member
Posted 3 years ago #
Thanks, I actually found a loop to display just one on the homepage before checking back here. Shouldn't have gave up on searching for an answer so soon.
One problem arises though which might need a new forum post.. I'm using this code on the homepage AND I want to exclude one category from ever showing up on the homepage
<?php query_posts('posts_per_page=1');?>
however when I add the code below somewhere, it does exclude that category but it also shows multiple posts again
<?php
if (is_home()) {
query_posts("cat=-3");
}
?>
dizzyvapor
Member
Posted 3 years ago #