Do you want to remove description text from category archive pages when using the Astra Theme? This can be implemented with a filter hook targetting using the code shared below.
Code Snippet: Remove category description text
In the WordPress Dashboard, go to Appearance > Theme Editor and open the functions.php file of your Astra child theme. Then add the following code at the end. Alternatively, you can use code snippets plugin for adding custom code.
1 |
add_filter( 'get_the_archive_description', '__return_null'); |
markz says
Is there a way to implement this for only the Archive Listing Widget used in a sidebar?
markz says
The code removes the category description, as intended.
But in the sidebar category listing, the description becomes the title attribute of the link to the category.
Long descriptions look ugly as titles.
I haven’t been able to get that title to not appear.
Dime Savvy says
Thank you. Really appreciate finding this. I was trying everything I see online only your code works.