I have category named “magazine” and I create some article of this category. this is the link of my article http://www.example.com/magazine/article-one/ I want to check in function.php if I’m in this category or not, for that I use if(is_category('magazine')){die('I am in magazine category');} but I got nothing. I tried by using is_single and is_page but all this function not working.

Read more here: is_category, is_single, is_page not working in function.php


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: