php - WordPress - How to get IDs for all pages in the current menu? -


i building 1 page scrolling wordpress theme, , want able create simple loop grab page id's in current menu, spit out content.

i know how spit out content page, given id, don't know proper way ids current menu is.

any suggestions?

figured out:

$menuitems = wp_get_nav_menu_items('main-menu'); foreach($menuitems $page) {     $post = get_post($page->object_id);     $content = apply_filters('the_content', $post->post_content);     echo $content; } 

Comments

Popular posts from this blog

Line ending issue with Mercurial or Visual Studio -

tags - Jquery Mixitup plugin help prevent handlers being destroyed -

c# - Delving into the world of XML (Windows Phone) Error I dont understand (The ' ' character, hexadecimal value 0x20, cannot be included in a name.) -