I want the user to be able to exclude pages from the navigation bar by simply ticking them off.
I’ve created a list off all the menu items with a checkbox next to them like this:
echo "<form method='POST' action=''>"; wp_list_pages(array("link_before" => "<input type='checkbox' name='radio' value='$post_id' />", "title_li" => "")); echo "<input type='submit' name='radio_submit' /> </form>";
Now I need to be able to somehow have the page id inside the value of the checkbox. So when the user hits submit then the page id’s get inserted into the $exclude variable in the navigation bar so the pages get excluded.
Any ideas how I can fetch the id’s from the generated list of navi items in the admin panel?
- The topic ‘Getting the ID From The Pages with wp_list_pages’ is closed to new replies.