• I’ve written a custom function (in the Thesis theme) that will show a special ad on category pages that match a specific category. I think I have the syntax right but I can’t quite seem to get it to show.

    Here’s the code:

    if(is_category('36')) { ?>
    		<div class="post_ad">
    		<h3>Headline</h3>
    		<p>Ad copy</p>
    	</div>
    	<?php }

    I’ve tried using the category slug, the category name, and the category ID. I’ve even tried using in_category instead of is_category, but no matter what I do, this simply will not display.

    What am I doing wrong?

  • The topic ‘is_category in custom function will not display on site’ is closed to new replies.