Forums

Hiding a page in the default menu of twenty-ten (5 posts)

  1. aykon
    Member
    Posted 1 year ago #

    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?

  2. aykon
    Member
    Posted 1 year ago #

    No updates?

  3. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    couple of things. Are you directly editing twentyten?

    If so, all your changes will be lost on a WP upgrade
    http://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 http://codex.wordpress.org/Function_Reference/wp_page_menu

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

  4. cbrendlinger
    Member
    Posted 10 months ago #

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

  5. cbrendlinger
    Member
    Posted 10 months ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic