How To Exclude Posts Category from Homepage in Thesis Theme

Lets say you have any post categories that you don’t want to showing up on your wordpress blog homepage together with all your other latest posts. There is the steps to do this on your wordpress blog that using thesis theme. If you are using wordpress 2.5 and above, you won’t be able to see the entry IDs on admin pages. However you can install the Reveal IDs plugin and activate it.

1. Assume that you have installed Reveal IDs plugin and able to see your category IDs on WordPress Thesis theme. For example, we will use entry ID 161 and 159.

2. In Dashboard admin –> go to Appearance –> Editor –> Select custom_functions.php.

Note : Please make sure you have select theme to edit : thesis

Add below code at the bottom of custom_functions.php. Click update file to finish.

/* Exclude Posts categories on the homepage */
function home_filter_begin() {
global $wp_query;
/* Exclude id 161 and 159 from homepage*/
$exclude = '-161,-159';
query_posts(array_merge(array('cat' => $exclude ),$wp_query->query));

function home_filter_end() {