Which filter affects the 'entry-title' post class

I created a plugin setting a $var to true if the post belongs to category 'a', and set the same $var to false if the post belongs to category 'b', it works and I can get the correct value depends on the category

what I need is to find a filter helps me to add an extra text to the entry-title post class so I can change post title align or color if if the post category is a without editing content.php file.

Here is the code:

function change_my_entry-title(){
    if ($var === true){
        return 'entry-title_cat_a';
    }else{
        return 'entry-title';
    }
}
add_filter(' ..... ','change_my_entry-title');

So which filter_name I should put instead of .....

Topic title filters css plugins Wordpress

Category Web


The filter that allows you to tweak the title value is [wp_title][1]. As mentioned by the commenters, the entry-title is a class pertaining to your theme.

If you need to set a class according to a certain value, try something like this in your template file:

<h1 class="<?php echo ($in_category_a) ? 'align-left': ''; ?>"><?php the_title();?></h1>

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.