Wordpress if condition for category single post

Status
Not open for further replies.

Gon

Active Member
537
2014
149
13,820
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
Status
Not open for further replies.
Back
Top