Support » Fixing WordPress » include costum post types in wp_page_menu()
5 years, 6 months ago
I´m looking for a way to include costum post types (which I´m using for special “pages”) into the function wp_page_menu().
Anybody can help with this?
Pretty sure that function only works with pages hence the name. Why not use
Thanks for answering!
Because wp_nav_menu() displays a navigation menu created in the Appearance → Menus panel. And this is not dynamic – or at least I don´t know how to make it dynamic.
I´m wondering, if wp_page_menu() could be manupulated through a filter in function.php?
Could you use get_posts() as this has a post_type parameter?
thanks for this hint! wp_page_menu(‘post_type=mycostumposttype’) is working as well – so I´ll have to find a way to include more than only one post type.