vivacitydesign
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Displaying Parent name in sidebarbump…
Forum: Themes and Templates
In reply to: Displaying Parent name in sidebarOk, so I worked out how to do what I wanted by changing the code to this:
<?php if($post->post_parent) $children = wp_list_pages('title_li=&child_of='.$post->post_parent.'&echo=0'); else $children = wp_list_pages('exclude=13&title_li=<h2>Additional Links</h2>&child_of='.$post->ID.'&echo=0'); if ($children) { ?> <ul> <?php echo $children; ?> </ul>
But now I’m having another problem!
This is my page structure:
TEAMS (PARENT)
– SENIOR (CHILD of TEAMS)
– PLAYER PROFILE 1 (CHILD of SENIOR)
– PLAYER PROFILE 2 (CHILD of SENIOR)
– PLAYER PROFILE 3 (CHILD of SENIOR)
ETC
– JUNIOR (CHILD of TEAMS)
– PLAYER PROFILE 1 (CHILD of SENIOR)
– PLAYER PROFILE 2 (CHILD of SENIOR)
– PLAYER PROFILE 3 (CHILD of SENIOR)
ETCUsing the code I posted above, I can only use the wp_list_pages(‘exclude=xx’); on the first parent page (in this case ‘TEAMS’), and it doesn’t work with any pages lower in the hierarchy.
This means that when you’re looking at the TEAMS page (first PARENT), only the direct children appear in the sidebar (because I’ve manually excluded the other PLAYER PROFILES using the wp_list_pages exclude tag). But when you open one of the child pages (JUNIOR or SENIOR), all children of TEAMS display in the sidebar.
Can anyone think of a solution to this? I would very much appreciate any feedback!
Forum: Themes and Templates
In reply to: Displaying Parent name in sidebarNevermind. I worked it out!
Forum: Themes and Templates
In reply to: Displaying Parent name in sidebarYou’ll have to forgive my naivety, but I’m not sure how to use that piece of code to help me. It looks like it’s just going to display a list of Categories…there’s no conditional codes in there.
I clarify:
I have a Parent Page with three Child Pages
Procedures (PARENT)
Procedure 1 (CHILD)
Procedure 2 (CHILD)
Procedure 3 (CHILD)At the moment, I have sidebar setup to display the list of child pages – but ONLY IF the page that is currently being displayed is a PARENT or CHILD that are RELATED.
I would like to display the RELATED PARENT TITLE above the list of CHILD links.
Is there a way to do this, whilst still maintaining the conditional nature of the child link display? Furthermore, can I make the title that does appear conditional to which particular parent/child set is being looked at?
Apologies for the capitals – just trying to make it make more sense.
Forum: Fixing WordPress
In reply to: Post parent page as a title for all the child pages on sidebar .I’m looking to do the exact same thing!!