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

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -