Use wp_dropdown_pages()
:
print '<form action="' . home_url() . '">';
wp_dropdown_pages();
print '<input type=submit></form>';
You get a select
field with proper indentation, and clicking on the button will send the user to that page.
Use wp_dropdown_pages()
:
print '<form action="' . home_url() . '">';
wp_dropdown_pages();
print '<input type=submit></form>';
You get a select
field with proper indentation, and clicking on the button will send the user to that page.