• Resolved Andrew Leonard

    (@andrewleonard)


    Can anybody help me with the code so that widget-logic will not display the widget if this page is a child or descendent of the page “Fern Culivars”?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Thread Starter Andrew Leonard

    (@andrewleonard)

    I have resolved this all by myself. The thing that threw me was that I wanted to also remove the widget from the home page
    This is my code:
    global $post; return (!is_page(‘6965’) && ($post->post_parent<>”12872″));

    6965 is the home page and 12872 the Fern Cultivar (parent) page

Viewing 1 replies (of 1 total)
  • The topic ‘Code to check if child/descendent of a specific parent’ is closed to new replies.