Ancestor Title using Fold Page List plugin (2 posts)

  1. skube
    Posted 10 years ago #

    Hi, I'm trying to figure out how to display the title of my top most ancestor. I'm using the Fold Page List plugin and right now I can output the correct id by using:

    <?php echo reset(_wswwpx_page_get_ancestor_ids($g_page_id));?>

    But I would really like the name, not the id to display.


  2. wibbin
    Posted 9 years ago #

    I recently had to do something similar when trying to display the Parent Page's title. I think it'll help you

    $parentID = $wp_query->post->post_parent;
    $parent_post = get_post($parentID);
    $parent_title = $parent_post->post_title;

    You will have to access your array obviously. Hope that helps!

Topic Closed

This topic has been closed to new replies.

About this Topic