• Is it possible to suppress the title tags on the links to categories generated by list_cats?

    I initially thought that setting use_desc_for_title to 0 would do this, but the effect of that was to change the value of the title attribute not eliminate it.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I don’t know of a way to do this without hacking the function (a tiny bit). If you’re up to it:

    list_cats() is in template-functions-category.php (wp-includes/ directory). The function starts around line 248; the line we’re looking for is at about line 315:

    $link .= 'title="'. sprintf(__("View all posts filed under %s"), wp_specialchars($category->cat_name)) . '"';

    Just comment it out:

    // $link .= 'title="'. sprintf(__("View all posts filed under %s"), wp_specialchars($category->cat_name)) . '"';

    Hacking notes: Back up source files before editing them, and comment your changes for future reference.

    Thread Starter graemep

    (@graemep)

    Thanks, you made that really easy for me. It was done in seconds and it is working fine.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘list_cats without title attributes’ is closed to new replies.