-
-
Save billerickson/02fae2548294fec336e2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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