• Hello, I’m new to wordpress, and as I’m noodling around, I came across question that I need help with.

    I want to create a blog that has a horizontal navigation. I want categories to be the main tabs and sub-categories to be the sub-links in the drop down.

    (Just a note, I would like to avoid editing PHP code if I can, so basically the following questions are geared toward using the CMS)

    For example. On Twenty-Ten 1.2 theme WP comes with, there is a navigation bar. This navigation bar contains the static pages I create. Is there any way to change the navigation from displaying the Pages to the Categories without editing the PHP code? Or, is it possible to replace the current horizontal nav with a custom menu?

    I installed another theme Jarrah 1.7. Which also has a navigation bar across that displays only the static pages I created. And again, for the life of me, I can’t find the settings for it.

    Also I downloaded the Superfish plugin….It works great…It easily puts all of my categories as main navigation and sub-categories and sub navigation….But the only place I can put it is on the sidebar Is there a way to put this navigation at the top of the Twenty-Ten 1.2 theme?

    So again, just wondering how do I manage horizontal navigation? I’ll sum up my questions.

    1. In order to manage a horizontal navigation using only the CMS, do I have to have a theme that specifically allows me to edit it or am I missing something completely?

    2. Is messing with the PHP code the only way to change a navigation from displaying the pages to displaying the catories?

    3. Is messing with the PHP the only way to use Superfish as a horizontal Navigation?

    Thanks a lot for any help.
    kdubbie

Viewing 9 replies - 1 through 9 (of 9 total)
  • Is there any way to change the navigation from displaying the Pages to the Categories without editing the PHP code?

    Set up a custom menu.

    Thread Starter kdubbie

    (@kdubbie)

    Thanks for your reply, but this doesn’t tell me how to replace the horizontal menu with a custom menu without editing the php code.

    Are there any themes that allow the user to a customize the horizontal navigation without having to edit the PHP code?

    Try looking for a theme that has custom menu support.

    Thread Starter kdubbie

    (@kdubbie)

    Ok, thanks that’s good to know that it’s impossible to replace the standard horizontal navigation using only the CMS, unless you have a theme that supports it. I’m glad I know that now, so I don’t have spend anymore time looking for it.

    But I think I have figured out how to do what I am talking about. I found the php function in the header.php file that generates the navigation, it’s wp_nav_menu(), I found information on the WP function reference page, and was able to change the parameters to point to the custom menu that I created.

    <?php wp_nav_menu( array( 'menu' => 'myNavigation', 'theme_location' => 'primary' ) ); ?>

    And it worked. I looks like all I have to do now is add a class in the style sheet that formats it the way I want.

    But I still don’t understand what the Theme Location argument does. The following is from the reference page:

    $theme_location (string) (optional) the location in the theme to be used–must be registered with register_nav_menu() in order to be selectable by the user
    Default: None

    But unfortunately I still dont quite get what it means.

    Thanks

    If your theme uses wp_nav_menu(), then it already supports custom menus. The theme location is defined when registering the custom menu in the theme’s functions.php file. Some themes allow for multiple custom menus. Locations allow users to decide which custom menu should go where. See Appearance->Menus

    Thread Starter kdubbie

    (@kdubbie)

    oh I see what you’re saying. So let me ask, I created a custom menu and I edited the PHP header file to point to it, but I didn’t do anything in to the function.php file. Am I good?

    Also, when I firebuggeg my customized menu, I noticed there are a number of classes and ID’s already being generated. Which makes sense, but I want to change them so the menu looks how I define it.

    Should I create a child theme to make all these nav changes?

    WP creates the classes on the fly when the wp_nav_menu function is called. The function can take multiple parameters which can be found in the codex.

    I want to change them so the menu looks how I define it.

    Amend your CSS – not the code.

    Should I create a child theme to make all these nav changes?

    Yes – otherwise your changes will be over-written the next time you upgrade WordPress.

    Thread Starter kdubbie

    (@kdubbie)

    @esmi –> Thanks a lot… You’ve been a big help.

    Going to get started working on my first child theme.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Navigation Question’ is closed to new replies.