• ixall012

    (@ixall012)


    Hello guys,

    Do any kind soul know how I might add a dropdown menu to only one of my titles please ?

    I have looked at my style sheet … but can’t seem to see how to do it.

    Here is my site:

    Any ideas would be gratefully received.

    Best wishes !

Viewing 7 replies - 1 through 7 (of 7 total)
  • iamgarrett

    (@iamgarrett)

    http://codex.ww.wp.xz.cn/Conditional_Tags

    You could write an IF statement in your template that looks for the correct circumstance to use your menu code.

    for example, if I wanted to have some code that only showed on my single-post pages:

    if ( is_single() ) {
         PLACE CODE HERE;
    }

    Thread Starter ixall012

    (@ixall012)

    Thank you – I’m not familiar with that way.

    I have now find my menu code in ‘Header.PHP”

    Could I add some code below on if the titles to drop down another set of options pls ?

    iamgarrett

    (@iamgarrett)

    Yes to finding code in header.php

    As far as including dropdowns on specific pages…

    You probably want to build out your menu and then hide certain parts of it depending on what page the user is on with CSS and body or post classes.

    Thread Starter ixall012

    (@ixall012)

    This is my menue code:

    <div id="navmenu">
    
    <ul>
    <li><a>">HOME</a></li>
    <li><a href="images/">IMAGES</a></li>
    <li><a href="biography/">BIOGRAPHY</a></li>
    <li><a href="shop">SHOP</a></li>
    <li><a href="contact/">CONTACT</a></li>
    </ul>
    </div>

    Can I insert code to make, “shop” title drop down ?

    Just a simple piece of HTML ?

    Thread Starter ixall012

    (@ixall012)

    I don’t need it to be different, depending on which page you are on thanks.
    It just needs to be exactly the same, where ever you are.
    Thank you though.

    Thread Starter ixall012

    (@ixall012)

    I have added

    ` <li><a href=”shop”>SHOP</a>
    </li>
    <ul>
    <li><a href=”stockiests/”>STOCKIESTS</a></li>
    </ul>`

    Under SHOPS tab, but it doesn’t seem to create a drop down. It only adds another menu tab !

    Is it my theme which is disallowing this code to work do you think ?

    iamgarrett

    (@iamgarrett)

    Is there a reason you are hand-writing this and not using WordPress’s native menu interface? You can find it in Appearance -> Menus That way you can build out your menu much simpler. Then what you have your whole menu built out, you can hide certain aspect of it using CSS and the :hover pseudo-class (http://www.w3schools.com/css/css_pseudo_classes.asp).

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Create Dropdown menu for only ONE title ?’ is closed to new replies.