Last active
October 6, 2019 11:02
-
-
Save feastdesignco/f9f603422b8d4cc73c04f1592d983198 to your computer and use it in GitHub Desktop.
custom_prevent_cat_description_output
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('widget_categories_args', 'custom_widget_categories_args_filter', 11, 1); | |
/* | |
* removes the "category description" from being displayed as the title tag in the category link for the "categories" widget | |
* not sure why they decided to do this by default - it's a dumb feature - but at least it can be filtered | |
* add this to the code snippets plugin | |
* reference: https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_categories_args | |
*/ | |
function custom_widget_categories_args_filter( $cat_args ) | |
{ | |
$cat_args['use_desc_for_title'] = false; // bool or int | |
return $cat_args; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment