WordPress.org

Ready to get started?Download WordPress

Forums

One image for one specific menu-item (TwentyTen) (6 posts)

  1. Sgt. Floyd Pepper
    Member
    Posted 3 years ago #

    Hi there,

    I am currently working on a project which needs some special navigation. I designed my menu-header correctly. Now I want to add one image for each menu-item. But how can I add the JS I need to one specific menu-item? These items get arrayed, so I don’t have the complete code within my theme.

    Is there a way to do this?

    FYI: I have five menu-items and each of these needs a different image to display. I did setup classes for each image with display: none; so that the JS can turn it into display: block; as you hover the menu-item.

    I hope you get my point. Please let me know, if you have ideas...
    Best, Floyd

  2. Sgt. Floyd Pepper
    Member
    Posted 3 years ago #

    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></li>....

    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.

  3. nowherenowhere
    Member
    Posted 3 years ago #

    once again you can see how wonderful wordpress support is... Joomla! its just better

  4. Sgt. Floyd Pepper
    Member
    Posted 3 years ago #

    So you do have an answer to my problem?

  5. nowherenowhere
    Member
    Posted 3 years ago #

    Rather use joomla

  6. asadkhan
    Member
    Posted 3 years ago #

    do you want images for menu items are dots?

Topic Closed

This topic has been closed to new replies.

About this Topic