wp_list_pages function not showing children

WordPress auto updated to 4.6.6 and my “show children page’s menu” funtion stopped working. I’m running on a LEMP stack using https://github.com/Freshclicks/Fresh-Deploy

I’ve flushed the cache, updated to WordPress 4.7.5, and can’t seem to find the issue.

my theme sidebar has the following code:

<?php
if ( $post->post_parent ) {
    $children = wp_list_pages( array(
        'title_li' => '',
        'sort_column' => 'menu_order',
        'child_of' => $post->post_parent,
        'echo'     => 0
    ) );
} else {
    $children = wp_list_pages( array(
        'title_li' => '',
        'sort_column' => 'menu_order',
        'child_of' => $post->ID,
        'echo'     => 0
    ) );
}

if ( $children ) : ?>
    <ul class="nav nav-pills nav-stacked">
        <?php echo $children; ?>
    </ul>
<?php endif; ?>

This runs fine on my local LAMP stack and a similarly configured LEMP stack. I’ve flushed memcached and nginx cache, rebooted the server, and haven’t been able to solve this issue.

Any ideas what might be causing this?

Read more here: wp_list_pages function not showing children

Leave a Reply

Your email address will not be published. Required fields are marked *