Group Admins

  • Profile picture of Steve

WordPress Troubleshooting and Support

Public Group active 3 months, 2 weeks ago ago

WordPress support from our community

styling the wp_nav_menu( ); function

This topic contains 0 replies, has 2 voices, and was last updated by  lester 6 years, 8 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1510

    lester
    Participant

    hello wpnyc!

    i have recently used the following function to display my “Main Nav Menu” dynamically, a la chris coyier and jeff starr:

    < ?php wp_nav_menu(array(
    ‘menu’ => ‘Main Nav Menu’,
    ‘container_class’ => ‘navbar’)); ?>

    it worked for the most part and i’m eternally grateful since most of the functions i try do not; however, one of the navigation’s main styles is not working.

    according to the codex:
    “.current-menu-item
    This class is added to menu items that correspond to the currently rendered page.”

    miraculously, it does style the currently rendered page menu item many different ways, such as increasing the size of the text, changing the background color, adding a border around the menu item, etc.

    the problem is it won’t do what i have designed, which is simply make the text a different color.

    i really don’t want to compromise the design of my site for what seems to be a glitch / bug.

    any ideas will be greatly appreciated.

    thank you!

    #2618

    Steve
    Keymaster

    @lester– what’s the url of the site?

    #2619

    lester
    Participant

    @steve:

    a quick google search this morning solved the problem ~ was pretty easy.

    http://wordpress.org/support/topic/current_page_item-not-changing-link-text-colour

    i needed to include the specific container class name before the current page menu item and then add the anchor link “a” at the end.

    wish all my WP problems were that easy to solve.

    thank you!

    #2620

    lester
    Participant

    i have to add that it doesn’t make sense that i’d be able to style the same element with several different effects not be able to change font color unless the above is added.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.