How to kill title tag?

Forums Forums Menus How to kill title tag?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #162
    Anonymous
    Member

    Is there a way to kill Title tag in the generated anchor link so that on rollover the popup description of the link doesn’t come up? (you know, that yellow box).

    Love the plugin.

    #2662

    Not really, or at least not easily unless there is a solution I’m unaware of. Unfortunately WordPress automatically adds a lot of junk to generated links. You could probably recreate the functions which display the various chunks of the dropdown, but that’s a lot of work and not something I plan to do.

    An easy fix would be to simply use the custom code option in the beta plugin. But that wouldn’t automatically generate new links as they’re added to your blog/site.

    #2663

    Try the beta plugin. It allows you to exclude certain pages, with the custom code option you can arrange your blogroll however you please and there are a bunch of other options you may find useful.

    #2664
    Anonymous
    Member

    This was bothering me too.  Ryan’s right that this title attribute ("tooltip") comes from wordpress.  Basically, wordpres itself outputs links that include a "title" attribute in the <a href> tag.    It looks like the multi-level navigation plugin  just pulls those links from wordpress.  So when you hover over the buttons on your menu, the tool tip appears because you’re basically pointing at the wordpress-generated link.

    The easiest solution I found is to modify the wordpress .php file that generates the links.  The file is classes.php (It’s in your /wp-includes directory).  Open the file in a text editor and do a search for "view all posts filed under".  This will bring you right to the offending bit of code.

    What you want to do is eliminate all (AND ONLY!!) the following lines:

    if ( $use_desc_for_title == 0 || empty($category->description) )
    $link .= ‘title="’ . sprintf(__( ‘View all posts filed under %s’ ), $cat_name) . ‘"’;
    else
    $link .= ‘title="’ . attribute_escape( apply_filters( ‘category_description’, $category->description, $category )) . ‘"’;

    This deletes the bit that inserts the "title" attribute inside teh <a href> tag.  Don’t delete more or you’ll  make the menu buttons non-functional.

    If you’re a little squeamish, you can just comment the offending lines out by surrounding them in  /*  */ tags.

    I don’t know if this will have any unexpected consequences, but it looks like it’s working fine to me. 

    #2665

    That would work, but it’ll break every time you upgrade WordPress. There is probably a way to do this without hacking the core, but I have no idea how.

    #2666
    snowrider
    Member

    Thanks for the hack Jonathan.  I removed the lines, but the tool tip still shows up.  Maybe WP 2.7 has it somewhere else in the code.  Hopefully someday WP will put a settings option in the admin to disable tool tips or link titles.

    #2667

    There is no way WordPress will ever have an option in the admin panel for that. It is probably possible to write a custom function to do it instead or if there was enough demand for it then they could add an option into wp_list_pages, wp_list_categories etc. to disable it. But adding it as an option in the admin panel is never going to happen.

    #2668

    The new version of the plugin has an option in the settings section of the admin page for this. It should be available in the official repository in about 10 mins time.

    Thhanks to Klaus Kinski for pointing me in the direction of an article which explained an idiot proof way of achieving this effect.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.