You can use the_category
filter to hook a callback function like this:
add_filter('the_category','add_class_to_category',10,3);
function add_class_to_category( $thelist, $separator, $parents){
$class_to_add = 'my-category-class';
return str_replace('<a href="', '<a class="' . $class_to_add . '" href="', $thelist);
}
Related Posts:
- Get all categories and posts in those categories
- How to display non-hierarchical taxonomy as terms with checkboxes?
- Combine two taxonomies in a hierarchical tree
- Test if post has a category
- Make parent categories not selectable
- Reflect nested categories in appearance > menus
- I want to order categories based upon the latest post time
- Highlight current category in wp_list_categories
- How to find all posts without category and assign the “Uncategorized”?
- Get a list of commas separated categories inside a loop
- How to get Total Post In a Selceted category
- Plural Category Base Slug On Category Archive Page
- WP 3.0.5: Best way to add custom metaboxes for post categories?
- How do I view a feed consisting of posts from multiple categories?
- Marking old posts as no longer relevant
- Alphabetizing Posts in a Category Page?
- Unpublish all posts in a category
- Add Icons to the Product Category Sidebar Widget WooCommerce
- Add class to items in wp_list_categories()
- How is the single category page called and how does it know which posts to show?
- How to export/import categories and keep their IDs?
- Is it possible to select and edit the way the most recent post from a certain category is displayed on the page?
- How to link 2 categories (Sync)
- Problem with wp_create_category
- How to make a Thumbnails Mosaic
- wp_parse_args & category parameter
- Extract image url associated to a category
- Change existing taxonomy settings when using custom taxonomy
- Enter a variable in the ‘category_name’ parameter
- category filter doesn’t work in WPML
- How do you categorize pages?
- List Sub-Categories of a Parent Category
- add text to the top of category page
- If statement for catergories
- Rewrite a category
- Order of subcategories
- “Categories” for six authors [closed]
- WordPress/Woocommerce only show category in shop to a single role
- Category control subcategories
- Trying to add cat_ID to array for showing an image for specific Category
- display posts from specific category on a page , in thematic child theme?
- Latest comments from each category?
- custom post type category link redirects to index
- Categorie parents and childs displayed
- How to change amount of categories listed on dashboard?
- Display random categories
- Exclude a category name using cat name
- Get custom title if category
- Link To Child Category For A Post
- List a maximum of ‘x’ product categories with qty of ‘y’ in each column
- Post by category+author not working!
- Custom template for sub-sub-categories
- How can i change what one category displays?
- How do I change the category permalink structure?
- How to remove the tilte “category:category name”?
- How to display post in custom file not in archive file?
- why category__and and category__in wont work togather?
- Advanced permalinks structure
- Subcategory Page URL to Display Only Posts from that Subcategory?
- Setting the Primary Category for a Post Based on Context
- Show the number of the post
- Automatically adding tags and categories into Post Excerpt for searching
- Allow Custom Role to edit a custom post type category
- Custom Taxonomy Isotope Grid – Filter Buttons Not Working
- Shop Category Pages missing s
- How to prevent tag “iframe” from being deleted from the heading description of rubric?
- When creating a new product, auto assign it to all custom taxonomy woocommerce
- How do I merge WooCommerce categories with the same name?
- Custom get_the_password_form
- Some subcategories not working on custom portfolio sort
- How can I make a category function as a page?
- How to add custom option to wp_dropdown_categories?
- How to hide/remove featured images in particular categories post?
- Link For Portfolio Categories
- Displaying Category in sidebar post widget but not in the loop on home
- Create duplicate category page with content variations
- Renaming default category taxonomy?
- Profiling user with categories
- Media Categories as Classes on WordPress Gallery Shortcode
- Category names dependent on each other?
- Hide category name in URL
- Category Template for Custom Post Type
- Loop Through Categories in Custom Field
- Backend – Categories and Menus conflicts
- Loop through posts of CatA and store value of CatB in separate array
- Highlight posts that belong to current sub category
- How to add an empty entry to masonry?
- Own Custom Tags/Category page ( posts)
- Problem with single posts not showing correct category sidebar
- Multiple Categories under one URL, where ‘Front Page’ is used already
- finding out the top 5 source ( source is a custom taxonomy ), in a given category
- How to display many photo albums related to category
- Modify functions.php to add a term ‘uses-theme’ set to theme name on post save
- WordPress category gives 404 after moving to a different domain
- Create custom Perma link
- How to load/include category templates based on conditionals?
- Why does WordPress append a bullet to my category tag?
- how to implement next/prev within category archive?
- Add product category to post_class
- Moving Blog and Changing URL