Strict Standards: Redefining already defined constructor for class bbdb in /home/themes/public_html/forums/bb-includes/db-mysql.php on line 12

Strict Standards: Declaration of BB_Walker_Blank::start_lvl() should be compatible with BB_Walker::start_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_lvl() should be compatible with BB_Walker::end_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::start_el() should be compatible with BB_Walker::start_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_el() should be compatible with BB_Walker::end_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127
Menu stuck « ThemeShaper Forums

ThemeShaper Forums » Thematic

[closed]

Menu stuck

(6 posts)
  • Started 2 years ago by bogh
  • Latest reply from bogh
  • This topic is resolved

Tags:

  1. bogh
    Member

    I have added this to my child theme:

    function menu_args( $args ) {
    $args = array(
    	'menu_class' => 'nav sf-menu',
    	'container_class' => 'menu',
    	'walker' => new Custom_Walker
    	);
    return $args;
    }
    add_filter( 'thematic_nav_menu_args', 'menu_args' );

    And now I can use just only the first menu that I have created, if I change the primary menu nothing happens on the website.
    What could be the issue? Is something wrong with the above function or the filter?

    Thank you.

    Posted 2 years ago #

  2. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512


    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512
    helgatheviking

    Moderator

    if you change the menu nothing happens. please explain further.

    Posted 2 years ago #
  3. bogh
    Member

    Ok.
    So, I have created 2 menus: "Menu One" & "Menu Two". "Menu One" was the first created and the first I have used.
    Now I want my "Primary Menu" to be "Menu Two", so I have changed it in the backend. But on the website I still see "Menu One".

    If I remove that filter & the function I am able to change between "Menu One" & "Menu Two". So I have considered that function to be the cause for this issue.

    Let me know if is still unclear.

    Posted 2 years ago #

  4. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512


    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512
    helgatheviking

    Moderator

    no that is clear, thanks. i have not experienced this. i think i have an idea, but will try to test it out later.

    Posted 2 years ago #

  5. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512


    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512
    helgatheviking

    Moderator

    ok, it is as i thought.... when you set $args = array() you effectively overwrite the original $args that is being passed to your function. you eliminate everything, including the super important 'theme_location' parameter. without that wp_nav_menu() (the function that is using these args) probably has no idea what to do. you need to modify the array and not reset it. you can do that one of 2 ways:

    function menu_args( $args ) {
    	$newargs = array(
    		'menu_class' => 'nav sf-menu',
    		'container_class' => 'menu',
    		'walker' => new Custom_Walker
    		);
    	return wp_parse_args($newargs, $args);
    }
    add_filter( 'thematic_nav_menu_args', 'menu_args' );

    or

    function menu_args( $args ) {
    	$args['menu_class'] = 'nav sf-menu';
    	$args['container_class'] = 'menu';
    	$args['walker'] = new Custom_Walker;
    
    	return $args;
    }
    add_filter( 'thematic_nav_menu_args', 'menu_args' );

    this solves the problem for me here locally.

    Posted 2 years ago #
  6. bogh
    Member

    Thanks a lot. This solved it.
    Both solutions are working.
    The only difference I see for now is that the 1st solution seems to react faster on WP 3.4 RC1, when you are in Customize mode, and change the between menus.

    Thanks again.
    Have a good day!

    Posted 2 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.


Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method GA_Filter::spool_analytics() should not be called statically in /home/themes/public_html/forums/bb-includes/wp-functions.php on line 586

Strict Standards: Non-static method GA_Filter::spool_this() should not be called statically in /home/themes/public_html/forums/my-plugins/googleanalytics.php on line 183