I want to put a block beside the last sf-menu link in the menu but keep it inside #access.
How do I do it?
I want to put a block beside the last sf-menu link in the menu but keep it inside #access.
How do I do it?
Does it actually put the div inside #access or beside it?
I did try to follow that but had problems getting the custom menus to work. Is there another way?
well if you look at the code sample
1. the added div (in the sample it is called #access-search) is clearly within the #access div.
2. no- the sample doesn't work w/ 3.0 menus b/c wp_nav_menu is no where to be seen. also the function ties in to wp_page_menu.... but the point was that you can recreate the access function and add all the divs you want.
for example- (assuming you are using thematic 0.7.9.5)
function childtheme_override_access() { ?>
<div id="access">
<div class="skip-link"><a href="#content" title="<?php _e('Skip navigation to the content', 'thematic'); ?>"><?php _e('Skip to content', 'thematic'); ?></a></div><!-- .skip-link -->
<?php
if (strtolower(apply_filters('thematic_menu_type', 'wp_page_menu)')) == 'wp_page_menu') {
echo thematic_add_menuclass(wp_page_menu(thematic_page_menu_args()));
} elseif ((strtolower(apply_filters('thematic_menu_type', 'wp_page_menu)')) == 'wp_nav_menu') AND (function_exists('wp_nav_menu'))) {
if (has_nav_menu(apply_filters('thematic_primary_menu_id', 'primary-menu'))) {
echo wp_nav_menu(thematic_nav_menu_args());
} else {
echo thematic_add_menuclass(wp_page_menu(thematic_page_menu_args()));
}
} else {
echo thematic_add_menuclass(wp_page_menu(thematic_page_menu_args()));
}
?>
<div>Look I added a div</div>
</div><!-- #access -->
<?php }
add_action('thematic_header','childtheme_override_access',9);
adds 1 div right before the #access div closes. then it is up to you to style things...
It has now put a div inside #access! Thank you! Not sure I completely understand how that works, but I will take it in slowly :p
I am still having problems with it on ie6 though. The new div sits below the menu and also the overflow is all messed up. I'm pretty sure the default Thematic menu overflows too?
This topic has been closed to new replies.