Answers for "check current pages is a child page wordpress"

PHP
0

check current pages is a child page wordpress

<?php

global $post;     // if outside the loop

if ( is_page() && $post->post_parent ) {
    // This is a subpage

} else {
    // This is not a subpage
}
?>
Posted by: Guest on May-11-2020

Code answers related to "check current pages is a child page wordpress"

Browse Popular Code Answers by Language