ThemeShaper Forums » Thematic

[closed]

custom Navigation problem

(9 posts)
  • Started 4 years ago by rawsta
  • Latest reply from em hr
  • This topic is resolved
  1. I'm working on an artist page and have a little problem with the new custom navigation (wordpress 3.0.1 + thematic-rev682)

    I have a Theme Location that not seem to work so i tried the custom-navigation-widget what seem to work fine.
    but my problem is that all items align horizontal.
    But i want them vertical.

    display:block doesn't work

    any idea what i'm doing wrong ?

    Posted 4 years ago #
  2. got a link? what do you mean a theme location won't work? what code are you using? what kind of errors are you getting? you need to provide a lot more info. the suckerfish-style menu is meant to be horizontal. they menu (ul.sf-menu) is made horizontal by floating the li elements.

    .sf-menu li{
    float: left;}

    if you change that to

    sf-menu li{
    float: none;
    }

    they will stack up. however, dropdowns are now mucked up and will require fixing.

    Posted 4 years ago #
  3. OK... here's the link: http://www.rawsta.de/richie/ (child theme)

    i wanted to use the Custom Navigation (Design -> Menus) feature and added this code to the functions.php

    add_theme_support( 'menus' );
    
    function child_access_menu() {
    $menu_sys = 'wp_nav_menu';
    return $menu_sys;
    }
    add_filter('thematic_menu_type', 'child_access_menu');

    the field (Theme Location) says :"Your theme supports 1 menu. Select which menu you would like to use."
    But the Menu doesn't show up.. maybe i did something wrong or forgot something.

    so i used the "Custom Menu" Widget.

    I don't think that this widget uses the suckerfish Menu and i don't need dropdowns.

    I just started to work with Thematic...maybe i just forgot something...

    Posted 4 years ago #
  4. i just plugged it into my theme (used it before but couldnt remember) and i get a dropdown for "Primary Menu". do you not get that option in the backend? are you using the latest stable dev release of thematic? i just switched myself back to version to 0.9.6.2 (in the WP repository) and it says my theme supports zero menus, so that could be it.

    you can get the latest thematic here:
    http://developing.thematic4you.com/thematic-development-release/

    Your code will replace the standard #access. If you want more then you need to define them. Here is a great post on everything about the new menus

    http://justintadlock.com/archives/2010/06/01/goodbye-headaches-hello-menus

    if you know you arent going to use dropdowns, then you might want to filter away the the suckerfish scripts to make your pages a little lighter. there is a post/article on that somewhere on themeshaper.

    Posted 4 years ago #
  5. I use the latest stable thematic together with the latest wordpress version (see first post)

    in general i just want to get the Menu to work the way i want it.

    the Menu-widget is working so far.. i just have the problem the it shows horizontal.
    But i need it vertical.

    i'll have a look at the post of Justin Tadlock and hope that i can find some helpful tips there.

    Thanks for your help

    Posted 4 years ago #
  6. sorry missed that part about the version.

    also there seems to be a float on the .menu a in default.css that is causing the links to line up horizontally. your plugin is adding a .menu to the ul it creates, which then triggers the default.css stylesheet

    .menu a{
    float: none;
    }

    if you aren't already, you should try http://getfirebug.com

    what about this:

    function register_my_menu() {
    	register_nav_menu( 'primary-menu', __( 'Primary Menu' ) );
    }
    add_action( 'init', 'register_my_menu' );
    
    function sidebar_menu() {
    
    wp_nav_menu( array( 'theme_location' => 'primary-menu',
    					'container_id'=>'sidebar-menu',
                        'menu_class' => 'custom', 
    
    ) ); 
    
    }
    
    add_action('thematic_abovemainasides','sidebar_menu');

    for me this adds an unstyled list above the sidebar since i assigned the menu a class of 'custom' which doesn't exist yet in the css. or if you want to look similar to the sidebar styles you could add 'container_class' => 'aside', to the array.

    Posted 4 years ago #
  7. missed the float:left... haven't seen it before... but anyway...
    your code brings me the desired custom menu into my sidebar.. works awesome

    i gave the menu item the class .menu1 when i made it.
    i can change the classes in the menu editor so i can give every item a different background.
    but it's good to have an overall class to set up the basics.

    I'm working with Dragonfly (firebug like included in Opera) because i'm not a big Firefox fan...firefox is too slow...

    Thanks a lot for your help.. everything is working and i can go on

    Posted 4 years ago #
  8. glad it works. off-topic: are there a lot of addons for opera? i have gotten to love my ff extensions, but it can definitely be slow... and a memory hog.

    Posted 4 years ago #
  9. Hi,

    Heads up using add_theme_support in this way is not advised

    ref: http://forums.themeshaper.com/topic/add_theme_supportmenus

    -Gene

    Posted 4 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.