• Resolved tobbaz

    (@tobbaz)


    When a post in the search results (from search.php) has parents, I would like to show them in the result list. Like a breadcrumb navigation. I’m trying to do this with the get_post_ancestors(), but it just keeps coming back empty. Calling it from a page (page.php) it returns the array of ancestors correctly.

    Shouldn’t I be able to call get_post_ancestors from search.php? Is there a better way of getting the breadcrumbs?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘get_post_ancestors() in search.php is empty’ is closed to new replies.