Deprecated: Required parameter $location follows optional parameter $post_types in /home1/mybravet/public_html/wp-content/plugins/monarch/monarch.php on line 3783

Warning: session_start(): Session cannot be started after headers have already been sent in /home1/mybravet/public_html/wp-content/themes/Divi Child Theme/header.php on line 1
How To Get The Parent And The Subpage In Widget Logic | WordPress Developer Philippines How To Get The Parent And The Subpage In Widget Logic | WordPress Developer Philippines
Select Page

Hi every one have you tried using Widget Logic plugin before? Well most of the basic short codes are how to get the page, category, post every wonder how to get all the child pages inside the parent? Well here is a very effective way to deal with this

global $post; return ($post->post_parent=="13") || is_page("13");

Just change 13 to the page ID and that should do it.

Pin It on Pinterest

Share This