Hide meta and featured image for just one category

Hi, I’d like to hide all meta data except for the date, as well as the featured image for blog posts that are just in one category. Thanks

Hi There,

Please provide us your Blog URL and tell us what category is it that you want to hide the date and featured image.

Thanks,

Hi, the URL is pachurch.ca, and the category is koreangallery. But to be clear, I want to hide all the meta data except for the date. I also want to hide the featured image.

Hi,

To achieve that, you can add the code below in your child theme’s functions.php

 function x_integrity_entry_meta() {


    //
    // Date.
    //

    $date = sprintf( '<span><time class="entry-date" datetime="%1$s"><i class="x-icon-calendar" data-x-icon="&#xf073;"></i> %2$s</time></span>',
      esc_attr( get_the_date( 'c' ) ),
      esc_html( get_the_date() )
    );


    //
    // Output.
    //

    if ( x_does_not_need_entry_meta() ) {
      return;
    } else {
      printf( '<p class="p-meta">%s</p>',      
        $date    
      );
    }

  }

Then add this in X > Launch > Options > CSS

.archive.category.category-koreangallery .entry-featured {
   display:none;
}

Hope that helps.

Thank you, that worked for the meta data. But the featured image is still showing. Thanks for the help!

Hi again,

I’m not seeing the featured images on that category (see screenshot)

Please clear your browser’s cache and reload the page. If you also want to hide the featured image in single post of this category then add the following code in your Customizer via Appearance > Customize > Custom > Edit Global CSS:

.category-koreangallery .entry-featured {
    display: none;
}

Cheers!