Condition function for is parent category?
I’m not sure I fully understood your question, but wrapping a function inside a new function will make it shorter. For example, do the following in your functions.php file: function is_parent($slug){ if(is_category($slug)){ return true; }else{ return false; } } And then simply use it like: if(is_parent(‘slug’)){ // do something }