Support » Fixing WordPress » include costum post types in wp_page_menu()

  • bhenselmann

    (@bhenselmann)


    Hello,
    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?
    Thanks!
    Bernhard

Viewing 5 replies - 1 through 5 (of 5 total)
  • equalmark

    (@equalmark)

    Pretty sure that function only works with pages hence the name. Why not use
    wp_nav_menu instead?

    bhenselmann

    (@bhenselmann)

    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.

    bhenselmann

    (@bhenselmann)

    I´m wondering, if wp_page_menu() could be manupulated through a filter in function.php?

    equalmark

    (@equalmark)

    Could you use get_posts() as this has a post_type parameter?

    http://codex.wordpress.org/Template_Tags/get_posts

    bhenselmann

    (@bhenselmann)

    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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘include costum post types in wp_page_menu()’ is closed to new replies.