• I’m testing Thematic theme in a local WordPress 3.1 blog. I’d like to show the ‘Home’ link in my page menu (not nav menu, ’cause I haven’t created one yet). Then I created a child theme and add the following function in functions.php:

    function suhanto_menu_args($args) {
        $args = array(
            'show_home' => true,
            'sort_column' => 'menu_order',
            'menu_class' => 'menu',
            'echo' => false
        );
        return $args;
    }
    add_filter('wp_page_menu_args', 'suhanto_menu_args');

    But, the ‘Home’ link didn’t show up. I have to add an extra priority parameter when calling add_filter function:

    add_filter('wp_page_menu_args', 'suhanto_menu_args', 20);

    The priority parameter value must be more than 10 to properly display the ‘Home’ link.

    Is this default behavior or a bug?

    (My analysis):
    Thematic has its own wp_page_menu_args filter called thematic_page_menu_args. Apparently this default Thematic filter is applied last, overwriting any parameter supplied in my own filter. If I put the extra priority parameter, I could change the default order so my own filter can be applied last.

Viewing 1 replies (of 1 total)
  • hi Agus,

    I have been messing around with Thematic 0.9.7.7 for a few weeks now.
    I have run across the same problem. And maybe I can give both our questions a bump back to the top.

    Thematic gives a custom child theme to use, and within functions.php you can uncomment the following

    function childtheme_menu_args($args) {
        $args = array(
            'show_home' => 'Home',
            'sort_column' => 'menu_order',
            'menu_class' => 'menu',
            'echo' => true
        );
    	return $args;
    }
    add_filter('wp_page_menu_args','childtheme_menu_args');

    But I have the same problem, the Home button does not appear. I even tried adding a priority of 20 as you did, which did nothing.

    I am still fairly new to WordPress myself, but maybe someone can shed light on the subject.

    Jonathan

Viewing 1 replies (of 1 total)
  • The topic ‘Thematic feature or a bug?’ is closed to new replies.