Support » Plugin: Advanced Text Widget » [Plugin: Advanced Text Widget] Child of Condition

Viewing 1 replies (of 1 total)
  • Plugin Author Max Chirkov

    (@maxchirkov)

    Since there is no single conditional function that determines hierarchy of pages, I would recommend creating a custom function like is_parent($page_id) – which later you could use anywhere else including the ATW conditions. Take a look at “Testing for sub-Pages” section on this page http://codex.wordpress.org/Conditional_Tags their example of is_subpage() function is almost exactly what you need, in your case you just need to pass an argument (page id) and compare it to the $post->post_parent (like $page_id == $post->post_parent). That’s it.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Advanced Text Widget] Child of Condition’ is closed to new replies.