WordPress › Support » is-page-or-ancestor
This plugin is easy to use and very basic in its concept. It will recursively test if the page you pass into this function is the current page or ancestor of that page. You can pass either a page ID or page name and it will return true or false. For example, if I wanted to test that the current page I'm viewing is the About page or one of its ancestors, I would then use the following code to echo
current_page_item if the function returns true.
|[Plugin: Is Page or Ancestor] $post->ancestors was always blank, so always returned false||1||James Revillini||2 years|
You must log in to post.