ThemeShaper Forums » Thematic


How do I put a new div inside #access div?

(5 posts)
  • Started 10 years ago by neonbible
  • Latest reply from neonbible
  • This topic is not resolved


  1. neonbible

    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?

    Posted 10 years ago #
  2. neonbible

    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?

    Posted 10 years ago #
  3. 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

    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 -->
    	    	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 }

    adds 1 div right before the #access div closes. then it is up to you to style things...

    Posted 10 years ago #
  4. neonbible

    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?

    Posted 10 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.