Hover effect for arrayed menu (TwentyTen)
-
Hi there,
I can make my idea more clearly now. I am working with the theme TwentyTen. Within the header.php you can find the line 85:<?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>. Here my menu gets arrayed dynamically. The Line, I can see in the sourcecode is this:<div class="menu-header"><ul id="menu-main" class="menu"><li id="menu-item-275" class="menu-item menu-item-type-post_type menu-item-275"><a href="#">Linkvalue</a>....Now I want to add one specific line where the dot is:
...Linkvalue•</a>.... Is it possible to do this by hacking functions.php or the array? And further: Is it possible to add a dynamic line?The goal is this:
...Linkvalue1<crap1></a>... ...Linkvalue2<crap2></a>....I would be so happy to get some advice.
-
Don’t edit the Twenty Ten theme! Your changes will be over-written the next time you upgrade WordPress or the theme. For this reason, it is recommended that you consider creating a child theme for your customisations.
Hi esmi,
Thanks for the advice. I am already working with my own child theme. It is based on the TwentyTen. Because of that I referred to TwentyTen, so you can figure, what structure and framework I am basically using. I am looking for a solution within the theme without touching the WP core for obvious reasons. Do you know if I can get inside of the array that way?Not that I’m aware of. What are these additions going to be used for?
I want to have a simple and slim hover effect in my menu. I found Eric Meyer’s Pure CSS Popup. He adds the element by
display:blockwhen hovering the actual link. All very simple. However, the element with the same class as the link has to be before the</a>tag. In my opinion it is a very structured and slim way to define a hover effect. Or is there something better? Which works with the WP array? I am sure there are other solutions but I can’t figure them out right now.
The topic ‘Hover effect for arrayed menu (TwentyTen)’ is closed to new replies.