0

We are using custom breadcrumb titles for a hierarchical custom post type. We would like to have the page parent dropdown use the breadcrumb title if it is available and then the title if it is not.

  • How is the custom breadcrumb title set? With a plugin? – Jacob Peattie Mar 12 '19 at 11:25
  • Correct. We are setting it through the Yoast plugin. – Dane Morgan Mar 12 '19 at 11:31
  • 1
    Here's the relevant code: github.com/WordPress/WordPress/blob/5.1/wp-admin/includes/… Those args are passed to get_pages; I don't know if you can use the page_attributes_dropdown_pages_args filter to set up the query how you want? Alternatively you might need to hook into wp_dropdown_pages, or replace its output with a filter. – Rup Mar 12 '19 at 11:50
  • Yes, I've drilled down through this section into wp_dropdown_pages and wp_parse_args. I can see in these how I could filter the query itself to return a different set or subset of pages, but I can't see how I could filter the output to replace the title with another value. – Dane Morgan Mar 12 '19 at 12:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.