Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created August 22, 2012 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/02fae2548294fec336e2 to your computer and use it in GitHub Desktop.
Save billerickson/02fae2548294fec336e2 to your computer and use it in GitHub Desktop.
<?php
/** exclude artwork and public cats on news page */
if (is_page(‘News’)) {
echo “help!! when the echo line is gone, the next function doesn’t work”;
}
function exclude_cat($query) {
if ($query->is_home) {
$query-> set(‘cat’, ‘-40 -14′);
}
return $query;
}
add_filter(‘pre_get_posts’,'exclude_cat’); ‘
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment