get parent pages name in string format
-
Hi,
I have a custom post_type(using magic fields2) called “towns”. Town “x” has subpages, when I am on these subpages I need to get the string name of the parent page(“x”) and not the ID. I’ve tried…
echo $post->post_parent(returns ID) $parent_title = get_the_title($page->post_parent); echo $parent_title; (returns sub-page/ current page name)
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘get parent pages name in string format’ is closed to new replies.