Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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
}
?>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #current #pages #child #page #wordpress
ADD COMMENT
Topic
Name
4+1 =