Wordpress if condition for category single post

Gon

Well-Known Member
437
131
43
2014
810
I trying to add something for selected category single post. Here is the code i tried
PHP:
<?php if (is_single() && in_category(array('category id')))
{  echo 'here is content'; }
?>
i even tried category name as well, but did not work.
 
Last edited:
2 comments
Top Bottom