• 0
Sign in to follow this  
Followers 0

Show only three categories on blog

Question

Posted · Report post

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

5 answers to this question

  • 0

Posted · Report post

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/

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

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?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

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
  • 0

Posted · Report post

I presume from that statement that you have fixed it. Is that correct?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

yes, that's correct.

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  
Followers 0