Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End [Solved] WordPress child/parent relationship Re: [Solved] WordPress child/parent relationship

#61828
hoss9009
Member

Ok… another problem.

Whem I’m on the parent, I want the parent title to show up in my nav, but it’s not.
This is the code I’m using.

Code:
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) { ?>

post_parent) {
$parent_title = get_the_title($post->post_parent);
echo $parent_title;
?>

Here’s a link to the site itself… http://www.ericdmunoz.com/dhe/summer-programs/

You’ll notice that there’s a spot for an h3, but it won’t show up until you click on a child.

Any ideas how to have my cake and eat it, too?