Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author webvitaly

    (@webvitaly)

    It is impossible to make with the plugin.

    I would recommend to modify theme files.
    You should check if current page has subpages and in that case you should show that subpage.

    Thread Starter Pepozzo

    (@pepozzo)

    Thanks!

    So, i have to modify theme code and it’s impossible to make a code call to the plugin from the theme page, right? (this could be a stupid question)

    Plugin Author webvitaly

    (@webvitaly)

    You should add to template something like this:

    <?php
    $children = get_pages('child_of='.$post->ID);
    if( count( $children ) != 0 ) {
    	echo do_shortcode('[subpages]');
    } else {
    	// no subpages
    }
    ?>
    Thread Starter Pepozzo

    (@pepozzo)

    That works perfectly!

    Thank you so much!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Execute [subpages] on every page that contains subpages’ is closed to new replies.