WP list pages. Need little help
-
Hey all,
I’m trying to display a navigation on my sidebar but I want it in a certain way that I’m not able to get through with.
Right now I’m using 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> <?php echo $children; ?> </ul> <?php } ?>
It works fine but there are some issues (I’ve tried the code below that one also from https://codex.www.ads-software.com/Template_Tags/wp_list_pages#List_subpages_even_if_on_a_subpage ) but no good.
I’ve created a diagram of what exactly I’m looking for. If I was a little better at creating custom code then it would be smooth but unfortunately I can’t till now so all my hope lies on this community ??
Here’s the deal:
https://i42.tinypic.com/hx98n6.jpgPlease help me ??
Thanks in advance
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘WP list pages. Need little help’ is closed to new replies.