PHP 29
WP list pages of post_parent By micha on 15th August 2019 11:51:28 AM
  1. <aside class="sidebar-page">
  2. <div class="sidebar-inner">
  3.   <h2><?php echo get_post_field('post_title', $post->post_parent); ?></h2>
  4.   <?php
  5.         $args = array(
  6.           'authors'      => '',
  7.           'child_of'     => $post->post_parent,
  8.           'title_li'     => ''
  9.         );
  10.         echo '<ul class="submenu">';
  11.         wp_list_pages($args);
  12.         echo '</ul>';
  13.   ?>
  14. </div>
  15. </aside>

Paste is for source code and general debugging text.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste

Login or Register to edit or fork this paste. It's free.