Hide entry-header for a specific category


I now you can hide the entry-header using css but what if I want just to hide it for a specific category?

<div class="entry-header">
    <div class="entry-meta category-meta">
        <div class="cat-links"><a href="https://web.com/category/mycategory/" rel="category tag">Auspiciadores</a></div>
    </div><!-- .entry-meta -->
    <h2 class="entry-title"><a href="https://web.com/2020/02/06/entry-two/">My Category</a></h2>        
    <div class="entry-meta">
        <div class="date"><a href="https://web.com/2020/02/06/entry-two/" title="Entry Two">6 february 2020</a> </div> 
        <div class="by-author vcard author"><a href="https://entry-two/author/somebody/">Somebody</a> </div>                                                                

I want to aply something like the following css but just for an especific category:

.entry-header {


Can I accomplish this writing in functions.php something like this:

function prefix_category_title( $title ) {
    if ( is_category( 'auspiciadores' ) ) {
        $title = single_cat_title( '', false );
    return $title;
add_action( 'get_the_archive_title', 'prefix_category_title' );
, , Rodrick 8 months 0 Answers 45 views 0

Leave an answer