WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to be able to add page content onto the startpage (index.php). But only the pages that i've added in custom menu, and in that order too.

I've been searching for a while now, but can't find anything close.

Big thanks to any one that can lead me in the right direction.

share|improve this question
up vote 1 down vote accepted

You can use get_nav_menu_locations and wp_get_nav_menu_items to get your menu items.

$locations = get_nav_menu_locations();
$nav_items = wp_get_nav_menu_items($locations['your-menu-slug']);

You can then process $nav_items to display your page content. It can get complicated but it does work.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.