Jump to content
Sign in to follow this  
pedromaia

Show only three categories on blog

Recommended Posts

pedromaia    0
pedromaia

Hi, I need to show only trhee post categories on blog. Some of the post has more than one category. I tried this code but it didn't work: <?php if (!is_paged() and is_home()) { query_posts('cat=519,186,2'); wp_reset_query(); } ?> How I can do this? Thanks, Pedro

Share this post


Link to post
Share on other sites
Rob    547
Rob
This may not be your ideal solution, but, you can create a page (not a post) and use this plugin to add the list of posts (however many you wish) by category. Uses the "[catlist]" shortcode. Additional options select which category to display. Actually, incredibly easy to apply and works like a charm. http://wordpress.org/extend/plugins/list-category-posts/

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
Rob    547
Rob
Okay Pedro, what happened? If you create a static blog page and include a plugin, you can easily show category-specific posts only. There are several. Have you looked for others?

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
pedromaia    0
pedromaia
It didn't work very well. I had to do another work around with some code I found here.

Share this post


Link to post
Share on other sites
Rob    547
Rob
I presume from that statement that you have fixed it. Is that correct?

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×