Forums

Edit menu-item names BEYOND css (4 posts)

  1. Streetproject
    Member
    Posted 10 months ago #

    I have a client who wishes to have his menu items styled in a particular way.

    Each menu item will have either 1 or 2 words. If it has one, bold everything, if it has 2, remove the space between them and bold the second word.

    I know I have to tweak the wp_nav_menu function, and probably the wp_nav_menu_items function, I just don't know from there what to do. Any help in any way would be greatly appreciated.

  2. jeezyo
    Member
    Posted 10 months ago #

    In the upper right hand, from the menu editor, choose screen options. Show classes. Then you can add classes to each link.

  3. jeremyhawes
    Member
    Posted 10 months ago #

    No way to do this dynamically in CSS that I know of - you could definitely do it with jQuery though.

  4. Streetproject
    Member
    Posted 10 months ago #

    Yeah, I figured we couldn't do it that way. Currently I just put bold tags on the second words, but I would need a better fix. Eventually my client is going to change navigation on his own, and I would rather not teach my clients how to bold text. Even that simple idea is complicated to some...

Reply

You must log in to post.

About this Topic