The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › Back End › wp_page_menu
I’m working with a WordPress site and I’m trying to use the wp_page_menu function to display the home page as “Blog” and list two other pages using the &include argument by their ID number. The correct syntax is alluding me.
Any input is greatly appreciated.
WordPress Codex page
This is the code for showing the home page as ‘Blog’
'Blog') ); ?>
How do I add the &include argument into this?
You could do:
If you’re going to use an array, I like setting it up like WordPress suggests:
'include' => '2,3,4',
'show_home' => 'Blog' );
Little easiesr to see what’s going on.
Perfect! Thanks for the help. I was missing the need to define the array separately.
I’m not sure if you have to define it separately, I just like to do that for ease of reading. I think it’s that you were missing a semicolon after ‘Blog’).
'Blog'); ); ?>
That might work, too.