WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My use of the_category works fine, but I want to change the tooltip, which says "View all posts in (category name)".

How can I change this tooltip?

I guess this might be something similar to this.

Thank you

share|improve this question

I used this solution instead, within my single.php file:

//categories loop

$categories = get_the_category();
$separator = ', ';
$output = '';
    foreach($categories as $category) {
        $output .= '<a href="'.get_category_link( $category->term_id ).'" title="' .     esc_attr( sprintf( __( "%s" ), $category->name ) ) . '">'.$category-    >cat_name.'</a>'.$separator;
echo trim($output, $separator);
share|improve this answer

You want to change the tooltip... but to what? Sorry my crystal ball isn't quite working today.

Here are some options you have:

  • Change it in wp-includes/category-template.php but that's far from ideal since an update will overwrite this.
  • You can add a function to your function.php file. For example if you want to remove it completely (since you didn't write how you want to change it):

    function categories_without_title_attribute() {
        $categories = wp_list_categories('echo=0');
        $categories = preg_replace('/title=\"(.*?)\"/','',$categories);
        echo $categories;

Then of course use the fn to output your (modified) categories.

share|improve this answer
Thank you, I opted for the solution proposed below, which allows me to set the title I want without modifying master files. – p.a. Jan 20 '14 at 15:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.