ThemeShaper Forums » ThemeShaper WordPress Themes

[closed]

About to quit on Toolbox and Wordpress because of the most simple things.

(7 posts)
  • Started 2 years ago by Moby
  • Latest reply from dosejnky
  • This topic is not resolved
  1. Moby
    Member

    About to quit on Toolbox and Wordpress because of the most simple things.
    Im not a php ninja nor a Wordpress one. In fact im starting on both, but not being able to achieve the most simple things its really frustrating.
    In functions.php

    <?php
    	if ( function_exists( 'register_nav_menus' ) ) {
    		register_nav_menus(
    				array(
    					'top_menu' => 'My Custom Top Menu',
    					'sidebar_menu' => 'Super Sidebar Menu',
    					'main_menu' => 'Main Menu'
    				)
    		);
    	}
     ?>

    on my header.php
    ` <div id="navigation">

      <?php wp_nav_menu( array ( 'menu' => 'Top Menu') ); ?>

    <div>`
    and

    <div id="sub-nav">
    
    <ul>
                <?php wp_nav_menu( array ( 'menu' => 'Main Menu' ) ); ?>
              </ul>
            </div>

    The question is: How can i add an active state on a menu link?
    It's a simple question, but after 2 hours googling for an answer im still out of luck.
    Im using a free template and trying to convert it into wordpress for learning purposes using the Toolbox theme.

    Thanks in advance.

    Posted 2 years ago #
  2. Maybe this in your stylesheet?

    #sub-nav ul li a:active

    If that's what you mean by active state

    Posted 2 years ago #
  3. Make sure you check this out: http://codex.wordpress.org/Function_Reference/wp_nav_menu

    Posted 2 years ago #
  4. you know this is a Thematic forum right?

    but otherwise, WP puts special classes on the menu if you're on that page, so it is a CSS issue to target the right class. i highly suggest http://getfirebug.com for Firefox or I use the built-in dev tools w/ Chrome. (CTRL-SHIFT-J)

    wp's active class looks like

    current_page_item

    or

    current_menu_item

    so you can "highlight" them

    .current_page_item a , .current_menu_item a {
      background: pink;
    }
    Posted 2 years ago #
  5. Moby
    Member

    you know this is a Thematic forum right?

    Wrong! This is the Themeshaper Wordpress Themes section of the forum.
    Thanks for the firebug tip. I will see if i can sort this out.

    Posted 2 years ago #
  6. dosejnky
    Member

    Has anyone find a solution for that? I am trying to have a menu with active state, but can`t find a way to do it even with firebug.

    Posted 1 year ago #
  7. dosejnky
    Member

    Yep the key was ".current-menu-item", thank you anyway :-)

    Posted 1 year ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.