• I am working on a website for one of my friends and using the Twenty-Ten theme. I have created a PHP form handler that logs the data someone enters and needs to redirect to a page once completed. I created a page for it to redirect to in WordPress but I don’t want this page to show up in the default menu that the site creates. I tried researching the wp_pages function but I can’t figure out how to use it. I could create a menu in the admin tools but then I think I loose the subpages functionality that I really want. Can anyone assist?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter aykon

    (@aykon)

    No updates?

    couple of things. Are you directly editing twentyten?

    If so, all your changes will be lost on a WP upgrade
    https://go.rvoodoo.com/WPchild

    The easiest way to avoid having pages show up in the menu is to use appearance->menus to make a custom menu

    otherwise in your child theme you would need to modify

    /**
     * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link.
     *
     * To override this in a child theme, remove the filter and optionally add
     * your own function tied to the wp_page_menu_args filter hook.
     *
     * @since Twenty Ten 1.0
     */
    function twentyten_page_menu_args( $args ) {
    	$args['show_home'] = true;
    	return $args;
    }
    add_filter( 'wp_page_menu_args', 'twentyten_page_menu_args' );

    wp_page_menu https://codex.www.ads-software.com/Function_Reference/wp_page_menu

    which is the fallback, and make use of the exclude parameter

    What did you end up doing aykon? I have the same issue… exactly.

    Nevermind… I figured it out. I used the custom menu and staggered the subpages. Worked perfectly.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hiding a page in the default menu of twenty-ten’ is closed to new replies.