Last active
April 21, 2017 00:53
-
-
Save alandbh/9f1a957ae04d4551ff3272d67a015c34 to your computer and use it in GitHub Desktop.
If has term.
Verifica se o post atual (dentro do loop) possui uma taxonomia associada.
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
if( has_term( 'jazz', 'genre' ) ) { | |
// do something | |
} | |
// ou | |
has_term( $term, $taxonomy, $post ); | |
//https://codex.wordpress.org/Function_Reference/has_term |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment