ThemeShaper Forums » Thematic


custom menu in thematic childtheme

(5 posts)
  • Started 4 years ago by Furfur
  • Latest reply from helgatheviking
  • This topic is resolved
  1. I've been trying to add a custom menu in the thematic above header to display
    a custom menu, but I get the problem that the background image for the menu is appearing below the menu istead of behind it

    the link to my site is
    any help would be greatly appreciated.

    here's the function and css

    function childtheme_menu() {
                   echo '
                     <ul id=\'menu2\'> '.wp_list_bookmarks('title_li=&categorize=0&category=2') .' ';
          add_action( 'thematic_aboveheader', 'childtheme_menu' );
        background: url(img/catbgnew2.png)repeat;

    and heres what firebug is outputting

    <a href="">Gallery</a>
    <ul id="menu2">
    Posted 4 years ago #
  2. I presume the link to your Gallery is supposed to be in the #menu2 id? The fact that it is current NOT, explains why the background is appearing below instead of behind... they are being outputted as 2 separate things so they are getting stacked on top of each other.

    Rather than try to figure out what isn't working, I will just point you to what I think is the easiest way to create a custom menu:

    I have used this and it is great. Then you should be able to hook it into your theme all wrapped in a div (since if you are injecting it to the thematic_aboveheader you are really only inside the #wrapper div) w/ the following

    function childtheme_menu() { ?>
    <div id="aboveheader">
    <?php menusplus(#); ?>
    add_action( 'thematic_aboveheader', 'childtheme_menu');

    where the # is the number for the menu you are trying to use.

    Posted 4 years ago #
  3. ok I've added the plugin and the code into the functions.php and it is kind of working, the only problem is the links are stacked instead of inline, any ideas?

    Posted 4 years ago #
  4. never min I managed to get this sorted, thanks for the plugin reference and the help helgatheviking


    Posted 4 years ago #
  5. glad I could help. I just realized that I used the following code in my own theme. Adding the div class=menu and especially the ul class taps into Thematic's default menu styling.

    <div id="aboveheader">
    <div class="skip-link"><a href="#content" title="<?php _e('Skip navigation to the content', 'thematic'); ?>"><?php _e('Skip to content', 'thematic'); ?></a></div>	
    <div class="menu menusplus">
    <ul class="sf-menu sf-js-enabled">
    <?php menusplus(1); ?>
    Posted 4 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.