I want to make a menu from a hierarchical custom post type.
There is a default WordPress widget called 'Pages' that give you list of all the pages preserving their hierarchy.
Is there a way to use this widget for custom post types?
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.
Sign up to join this communityI want to make a menu from a hierarchical custom post type.
There is a default WordPress widget called 'Pages' that give you list of all the pages preserving their hierarchy.
Is there a way to use this widget for custom post types?
As per first comment, you can use wp_list_pages
like this:
wp_list_pages ( array ( 'post_type' => 'yourcustomposttype' ) );