WordPress.org

Ready to get started?Download WordPress

Forums

[closed] WP3 Integrated Menu #no-link (9 posts)

  1. yesmaybe
    Member
    Posted 3 years ago #

    Hi,

    Somewhere on the menu settings, there should be an option to choose #no-link for each menu item, so if you have a heading category with no content you can skip directly to the offspring.

    While I see the integrated menu works well on small sites, it can be time consuming to set-up and manage on larger sites as it seems not to make use of the wp_list_pages() call.

    It has the ability to add top-level pages, why can't this be extended to individual posts added to a certain category?

  2. yesmaybe
    Member
    Posted 3 years ago #

    As a work around I am making a custom link URL #no-link with Label category name. This duplicates my work, but means that a parent category heading can be a null-link.

    Any better ideas?

  3. Rand HOPPE
    Member
    Posted 3 years ago #

    I've just come up against this, as well. Forgive my cluelessness, but can you describe your workaround in a little more detail?

  4. Rand HOPPE
    Member
    Posted 3 years ago #

    never mind..

    Found the answer here:
    http://forum2.bytesforall.com/showthread.php?t=9060

  5. Rand HOPPE
    Member
    Posted 3 years ago #

    Oh, that doesn't really do it, it just sets up a link to #

    Does your workaround make NO link?

  6. Kenneth
    Member
    Posted 3 years ago #

    If you're using jQuery, one solution would be to target the link and remove the 'a' tag altogether. I'm using something like this and it works great, taking the links off only the parent categories.

    <script type="text/javascript">
            jQuery(document).ready(function () {
                jQuery('li.menu-item-type-taxonomy > a').contents().unwrap();
            });
    </script>
  7. tracyberna
    Member
    Posted 3 years ago #

    <--jQuery dork

    Where in the template would you post this script - in the head element or somewhere within the nav div itself?

  8. sreijnho
    Member
    Posted 3 years ago #

    I know what you mean...and better yet...I have the solution!!!
    It's simple: Just add a 'custom link' to your menu. The url off that link doesn't have to exist, it can be like 'http://a' or something. When you added this link, just go to that custom link in your menu, unfold it and delete the URL.
    Now you have a category in you menu that is NO LINK!!!

  9. aliceralph
    Member
    Posted 3 years ago #

    sreijnho, thank-you so much!! This worked perfectly and such a simple (but not obvious) fix!

    yesmaybe you should mark this as 'resolved'

Topic Closed

This topic has been closed to new replies.

About this Topic