Thematic feature or a bug?
-
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.
- The topic ‘Thematic feature or a bug?’ is closed to new replies.