This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: check if posts are in custom taxonomy

Home Forums Product Support Forums Ajax Search Pro for WordPress Support check if posts are in custom taxonomy Reply To: check if posts are in custom taxonomy

#41602
kokosankokosan
Participant

Hi, sorry for not being clear. The code below displays the div on every post. I want to display the div below only if a post has custom taxonomy “topic1”. In this case, use $r->content_type == 'pagepost' or 'term'?

<?php
if ($r->content_type == ‘pagepost’ ) {
?>
<div>show this div on the result if posts are in taxonomy “topic1″</div>
<?php
}
?>