WordPress.org

Ready to get started?Download WordPress

Forums

include costum post types in wp_page_menu() (6 posts)

  1. bhenselmann
    Member
    Posted 2 years ago #

    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

  2. equalmark
    Member
    Posted 2 years ago #

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

  3. bhenselmann
    Member
    Posted 2 years ago #

    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.

  4. bhenselmann
    Member
    Posted 2 years ago #

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

  5. equalmark
    Member
    Posted 2 years ago #

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

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

  6. bhenselmann
    Member
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic