Support » Plugin: Widget Logic » [Plugin: Widget Logic] How to display only in a pages under a parent's page?

  • Resolved JustBlog

    (@justblog)


    Hi,

    Can someone please let me know how can I display something only in pages under a parent’s page?

    For example: I have 1,2,3,4,5 pages under parent’s page – A

    I would like to display something on all pages under parent’s page A and not parent’s page B. How should i do that? What codex function for this?

    Thanks!

    http://wordpress.org/extend/plugins/widget-logic/

Viewing 1 replies (of 1 total)
  • Ok. I think i got the solution stated:

    global $post; return (in_array(77,get_post_ancestors($post))); — WP page that is a child of page 77

    I just have to find what id of my parent’s page is then replace it with the no. 77.

    Thanks! 🙂

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Widget Logic] How to display only in a pages under a parent's page?’ is closed to new replies.