Created
July 29, 2016 11:51
-
-
Save danjjohnson/d50de2cde23d267a9391aba40ecfa0e5 to your computer and use it in GitHub Desktop.
Jetpack: Exclude related posts from multiple cats
This file contains hidden or 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
| function jetpackme_filter_exclude_category( $filters ) { | |
| $filters[] = array( 'not' => array( 'term' => array( 'category.name.raw' => array( 'donotshow', 'events' ) ) ) ); | |
| return $filters; | |
| } | |
| add_filter( 'jetpack_relatedposts_filter_filters', 'jetpackme_filter_exclude_category' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment