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

#61917
hoss9009
Member

Ok, so the code provided in this thread is AWESOME!

But….

The title of the parent page is now what I’m after..

Here’s my current code:

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

My problem is <?php the_title(); ?>. I want the title of the parent to show instead of the child. This way when choosing a child, the parent title exists the same in the H3 that i have there.

I know there’s gotta be something like post_parent_title, but I’m just not sure.

Any ideas? Help!

Thanks!