Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Make posts pulling from all categories except one WordPress

  • SOLVED

This blog page is pulling from a Page Template called full-width-blog.php. The left of the content is where the supposed general posts should appear. On the right is the sidebar.

How could you make the main left area pulling from Recent Articles and not from Testimonials?

See image for an example.

full-width-blog: [[LINK href="http://pastebin.com/R6BD1R8u"]]http://pastebin.com/R6BD1R8u[[/LINK]]
sidebar.php: [[LINK href="http://pastebin.com/YDGuR8GH"]]http://pastebin.com/YDGuR8GH[[/LINK]]

Here's the live example: [[LINK href="http://www.joaoalexandre.com/wordpressteste/blog-2/"]][[/LINK]]

Answers (1)

2012-08-20

Luis Abarca answers:

Use [[LINK href="http://codex.wordpress.org/Function_Reference/query_posts#Exclude_Categories_From_Your_Home_Page"]]query_posts[[/LINK]]


query_posts('cat=-2');


Wheres 2 is the ID of Testimonials


Luis Abarca comments:

in sidebar.php


query_posts("cat=$News,-2&showposts=".get_option("newspostlimit")); ?>