Exclude category posts
-
Hi Everyone,
I have done this before with success but seem to be missing something with this code. On the blog page, I want to show all posts except ID 3 and 5.
Here is the code:
<?php
global $more;
$more = 0;
$paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; query_posts(“category_name=blog&paged=$paged&posts_per_page=10”);
$count=1;
while(have_posts()): the_post();
$mykey_values = get_post_custom_values(‘image’);
?>Thanks for any help!
Steve -
You did not specify a blog address or reason for posting when you created this topic.
This support forum is for blogs hosted at WordPress.com. If your question is about a self-hosted WordPress blog then you’ll find help at the WordPress.org forums.
If you don’t understand the difference between WordPress.com and WordPress.org, you may find this information helpful.
If you forgot to include a link to your blog, you can reply and include it below. It’ll help people to answer your question.
This is an automated message.
-
You are posting to the wrong support forum. The correct one for your software is http://wordpress/org/support/ Please post there as we cannot help you here at WordPress.com. We provide support only for free hosted WordPress.com blogs here.
- The topic ‘Exclude category posts’ is closed to new replies.