Archived topic
Category description displayed on a title tag
3 replies · Started by Hilton on December 3, 2019
Hi,
We have edited category description to add important information about all posts comprised there, as an introduction which will guide the visitor among all related subjects.
But looking at the source code of the page, I realised that the category description has being used as a title tag in the items on the category widget (sidebar).
You can noticed that the categories "Dieta" and "Exercícios" (are the only ones with description until now) are displaying the description as title tag.
Is there a way to avoid displaying this title tag?
Hi there,
removed.....
Hi David,
Sorry, I think I've already fixed the problem with this function below:
// prevent the category widget from using the category description as the list item title attribute
function mbf_disable_cat_desc_widget_list_titles ( $cat_args ) {
$cat_args[ 'use_desc_for_title' ] = 0;
return $cat_args;
}
add_filter( 'widget_categories_args', 'mbf_disable_cat_desc_widget_list_titles' );
Thanks
ps. Before marking as resolved please delete the website information
Glad to her you got it resolved. Removed site info above.