Skip to content
WJunction - Webmaster Forum

Wordpress if condition for category single post

Status
Not open for further replies.

Gon

Active Member
581
2014
159
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.

About the author

G
Active Member · Joined
581
Messages
159
Reactions
43
Points

Advertise on WJunction

Reach 1000's of webmasters, hosts & affiliates. Banner & sponsored-thread slots available.

Contact us
Back
Top Bottom