I'm trying to populate a drop down select meta box with a list of child pages of that page.

I am using the wp_list_pages function to retrieve the list of child pages, no problem there.

The problem is that the list is return as li items. What is the best way to get these into an <option> format suitable for a dropdown box?

1 Answer 1


Not sure what you mean by "drop down select meta box", so maybe I'm way off, but there is a wp_dropdown_pages function that does that.

  • Wow thanks a lot, completely missed that, thanks. This is pretty much what I need. Yeh its a select box I want to add to a metabox on a page edit screen. Thanks again!
    – Davos555
    Sep 18, 2012 at 11:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.