Esiste un modo molto semplice in WordPress per sapere se un post ha un determinato tag.
Bisogna usare la funzione has_tag():
while( have_posts() ):
the_post();
if( has_tag( 'test' ) ):
//...
endif;
endwhile;
Esiste un modo molto semplice in WordPress per sapere se un post ha un determinato tag.
Bisogna usare la funzione has_tag():
while( have_posts() ):
the_post();
if( has_tag( 'test' ) ):
//...
endif;
endwhile;