• Resolved superuntitled

    (@superuntitled)


    I I am looking for a function that merely returns true or false. The function would check if the category archive being queried is a child of a particular parent category. The function would look something like this (similar to the is_category() function):

    if(is_child_of_category('3')){ //do something }
    if(is_child_of_category('4')){ //do something else }
    if(is_child_of_category('5')){ //do something entirely different }

    I have looked through the documentation and the forums but have not found any solutions, any ideas if this has been done or how one would go about it?

    thanks in advance.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Function like 'is_child_of_category'’ is closed to new replies.