Title: Replace &#8221;No categories&#8221;
Last modified: May 19, 2018

---

# Replace ”No categories”

 *  Resolved [Gustav](https://wordpress.org/support/users/4ever16/)
 * (@4ever16)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/replace-no-categories/)
 * In category widget.
    When there are no posts it ses ”No categories” In what file
   do i find this text i want to replace ”No categories” to ”Sorry nothing found”

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [7 years, 12 months ago](https://wordpress.org/support/topic/replace-no-categories/#post-10299096)
 * See [https://www.speakinginbytes.com/2013/10/gettext-filter-wordpress/](https://www.speakinginbytes.com/2013/10/gettext-filter-wordpress/)
 * In the category widget, you’d reference this text:
 * [https://github.com/WordPress/WordPress/blob/master/wp-includes/taxonomy.php#L552](https://github.com/WordPress/WordPress/blob/master/wp-includes/taxonomy.php#L552)
 *  Thread Starter [Gustav](https://wordpress.org/support/users/4ever16/)
 * (@4ever16)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/replace-no-categories/#post-10299322)
 * [https://github.com/WordPress/WordPress/blob/master/wp-includes/taxonomy.php#L552](https://github.com/WordPress/WordPress/blob/master/wp-includes/taxonomy.php#L552)
 * I changed that line without any effect.
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [7 years, 12 months ago](https://wordpress.org/support/topic/replace-no-categories/#post-10299341)
 * Do not edit core files!
 * I’m not sure where else to look. I don’t see that string used in [https://github.com/WordPress/WordPress/blob/master/wp-includes/widgets/class-wp-widget-categories.php](https://github.com/WordPress/WordPress/blob/master/wp-includes/widgets/class-wp-widget-categories.php)
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/replace-no-categories/#post-10299854)
 * **alternative **approach:
 * using a filter function for `'widget_categories_args'` to change the `'show_option_none'`
   string of the `wp_list_categories()` function used by the widget;
 * code to be added to functions.php of your (child) theme:
 *     ```
       add_filter( 'widget_categories_args', 'custom_no_categories_text' );
       function custom_no_categories_text( $cat_args ) {
       	$cat_args['show_option_none'] = 'Sorry nothing found';
       	return $cat_args;
       }
       ```
   
 * [https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_categories_args](https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_categories_args)
   
   [https://developer.wordpress.org/reference/functions/wp_list_categories/](https://developer.wordpress.org/reference/functions/wp_list_categories/)
 *  Thread Starter [Gustav](https://wordpress.org/support/users/4ever16/)
 * (@4ever16)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/replace-no-categories/#post-10299946)
 * Thanks Michael it worked!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Replace ”No categories”’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 3 participants
 * Last reply from: [Gustav](https://wordpress.org/support/users/4ever16/)
 * Last activity: [7 years, 12 months ago](https://wordpress.org/support/topic/replace-no-categories/#post-10299946)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
