WordPress.org

Forums

Ward
[resolved] ability for top tier menu clicks/links to page? (12 posts)

  1. briz_dad
    Member
    Posted 11 months ago #

    I am using the Ward theme (free theme) and I've created a Child theme from it.

    I see now that the menu is programmed so that a top tier item is just a click element to reveal sub-tier menu elements when they exist.

    Is it possible to change this so that the top tier menu item also clicks through to a page?

    This is the site: blackstardevelopment.org/wp-site/

    I'd like the top-tier menu item "Projects" to click through to the page - and the 2nd tier item to reveal on the mouse-over.

    Possible with this theme?

    Sincerely,
    Greg

  2. briz_dad
    Member
    Posted 11 months ago #

    I just added a 2nd tier "Projects Overview" as a work around.

    I still would like the top-tier item to click through to the projects page.

  3. daftduke
    Member
    Posted 11 months ago #

    Hi Greg,

    I think you'll need this to get the second tier items to reveal on hover:

    #menu-item-43:hover .dropdown-menu {
    display: block
    }

    - Luke

  4. briz_dad
    Member
    Posted 11 months ago #

    OK - thank you Luke!

  5. michello
    Member
    Posted 11 months ago #

    Hi briz_dad,

    sorry for the OT but how have you managed to add a logo in the top left corner? By default you can only insert text there in the admin panel...

  6. briz_dad
    Member
    Posted 11 months ago #

    michello - here ya go

    add a logo in the top left corner

  7. briz_dad
    Member
    Posted 11 months ago #

    by the way - if anyone knows how to make the top level menu click-through for this topic, it will be appreciated...

  8. michello
    Member
    Posted 11 months ago #

    Thanks briz_dad!

  9. daftduke
    Member
    Posted 11 months ago #

    Finally figured it out...

    1. Put this in your functions.php file (in your child theme)

    <?php
    function add_menuclass($ulclass) {
    return preg_replace('/<a class="dropdown-toggle"/', '<a class="dropdown-toggle disabled"', $ulclass, 1);
    }
    add_filter('wp_nav_menu','add_menuclass');
    ?>

    2. Admin Dashboard -> Appearance -> Menus

    3. Screen Options (top right) -> Show Advanced Menu Properties -> Check 'Link Relationship (XFN)'

    4. Go to your Menu Item (Projects) click on the carrot to pull down the options.

    5. Type 'disabled' in the 'Link Relationship (XFN)' field.

    6. Save the menu

    Good luck!

    - Luke

  10. briz_dad
    Member
    Posted 11 months ago #

    Close; not quite what I need.

    The solution above disabled the sub-menu completely - there was no way to get to the sub-menu item(s).

    (We can drop this if you want - I really appreciate you volunteering time to see if a solution could be found.)

    Sincerely,
    Greg

  11. daftduke
    Member
    Posted 11 months ago #

    Hi Greg,

    Yes, it disables the sub-menu, but by using this in conjunction with the CSS posted previously you should still be able to get to the sub-menu items or, at least it's working like this for me :-).

    Here's that css again:

    #menu-item-43:hover .dropdown-menu {
    display: block
    }

    It's hard to give up before a solution is found ! :-)

    - Luke

  12. briz_dad
    Member
    Posted 11 months ago #

    Luke!! That did it...

    blackstardevelopment.org/wp-site/

    thanks for the perseverance :-)

    (and I know about not wanting to leave something until it is done - thanks again!)

Reply

You must log in to post.

About this Theme

About this Topic

Tags