Im stuck on this and any help would be appreciated.
Say there is a parent page called "Stuff". And Stuff has several pages under it.
- Stuff
- more stuff
- more stuff1
- more stuff2
- It has no children
- Other with children
- etc
- etc 2
So when you click on "more stuff". That page would list all the pages under stuff ('more stuff, morestuff1, morestuff2'). Or if you click on "etc" you would see "etc, etc2"
Any thoughts or help would be appreciated. I'm using the Types plugin and have hierarchical setting turned on already.
**** I've used the following. Currently trying to figure out how to use ACF with the results. For example: If Advanced Custom Field"x" exists then use that instead of the title (basically use an image for the title instead depending on if that field exists and is being used)
<?php
if($post->post_parent)
$children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0&post_type=physicians");
else
$children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0&post_type=physicians");
if ($children) { ?>
<ul class="sub_post_nav">
<li>
<a href="/">
Home
</a>
</li>
<?php echo $children; ?>
<div class="clear"></div>
</ul>
<?php }?>