Viewing 4 replies - 1 through 4 (of 4 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Your theme doesn’t seem to be using the wp_nav_menu function, so you cannot target current page items with those class names.

    Use this class name, “current”.

    Thread Starter fernandolawl

    (@fernandolawl)

    I tried .current and it didn’t work. I tried using nav ul li current and it didn’t work either as well as a few other combinations.

    So if I add the function from the twentytwelve them into my functions.php file for my theme, it should work, right? However, I dont know what to change the add_filter stuff too. Can you help? TYVM (^_^)

    // This theme uses wp_nav_menu() in one location.
    	register_nav_menu( 'primary', __( 'Primary Menu', 'twentytwelve' ) );
    
    /**
     * Makes our wp_nav_menu() fallback -- wp_page_menu() -- show a home link.
     *
     * @since Twenty Twelve 1.0
     */
    function twentytwelve_page_menu_args( $args ) {
    	if ( ! isset( $args['show_home'] ) )
    		$args['show_home'] = true;
    	return $args;
    }
    add_filter( 'wp_page_menu_args', 'twentytwelve_page_menu_args' );

    You might want to use a theme that is more up-to-date and supported here (these forums only support themes from the repository on this site) – if you want a “blank” theme, look at Toolbox or BlankSlate.

    Thread Starter fernandolawl

    (@fernandolawl)

    Thank you I will look into Toolbox or BlankSlate.

    If I get BlankSlate theme, will it do what I need it to do above?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Starkers Naked Theme] class=”current_page_item”’ is closed to new replies.