WordPress.org

Ready to get started?Download WordPress

Forums

Outline menu item if is current (not in wp_nav_menu) (2 posts)

  1. MultiformeIngegno
    Member
    Posted 2 years ago #

    Hi guys! :)
    Twenty Eleven child theme. I have a custom header menu (unfortunately I can't use wp_nav_menu 'cause I have a rather complex menu with images, not text. Then submenus with text..).

    Anyway, it's something like this:

    <div id="blahblah" style="blahblah">
    <a href="blahblah"><img style="blahblah" src="blahblahblahblah"></a>
    <a href="blahblah"><img style="blahblah" src="blahblahblahblah"></a>
    <a href="blahblah"><img style="blahblah" src="blahblahblahblah"></a>
    <a href="blahblah"><img style="blahblah" src="blahblahblahblah"></a>
    </div>

    I added a img:hover tag and added an outline so that if you hover a menu item you see borders.

    But I'd like to have the borders automatically on the current page too..

    Is there a way (conditional tag?) to have this without having to create a custom template for each page of the menu?

    Thanks in advance! :)

  2. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    please post a link to your site to illustrate the menu structure.

    using a tool such as Firebug might help to find which styles are involved.

    there is a whole list of contitional tags:
    http://codex.wordpress.org/Conditional_Tags

    for instance:
    is_page()
    is_category()
    is_home()

Topic Closed

This topic has been closed to new replies.

About this Topic