• HappyCloud

    (@happycloud)


    I’m developing a theme for a client and they have a LOT of child pages that all use the same template.

    I’ve used this code

    <?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) { ?>
      				<ul class="sub-menu">
      					<?php echo $children; ?>
      				</ul>
     		 <?php } ?>

    what I want to be able to do is link all the child page links to a particular div within the template so the page isn’t jumping about all the time when a link is clicked

    Any help would be greatly appreciated

    Thanks in advance.

  • The topic ‘List child categories, link to particular div’ is closed to new replies.