Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //test for child pages used in main loop
- function testchildren () {
- global $post;
- $childtest = get_pages('child_of='.$post->ID); //$children or $myvar
- if( count( $childtest ) != 0 ) {
- /* echo 'has NO children'; */
- return false;
- }
- else
- {
- /* echo 'has children'; */
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement