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?
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?
As per first comment, you can use wp_list_pages
like this:
wp_list_pages ( array ( 'post_type' => 'yourcustomposttype' ) );