Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 134302

rikardo85 on "How to display sub pages in columns"

$
0
0

Hello,

I would like to display sub pages in columns.
Some parent pages have a lot of sub pages and the scroll is very long.

I am currently using the below code to display sub pages.

<?php
  if($post->post_parent)
  $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0");
  else
  $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
  if ($children) { ?>
  <div id="subNav">

<ul>
  <?php echo $children; ?>
  </ul>
  </div>
  <?php } ?>

Any help much appreciated.

Thanks


Viewing all articles
Browse latest Browse all 134302

Trending Articles