Remove category from ethos theme slider

I’m using Ethos and I would like to do the following:

  1. remove the date and categories on the top of the slider title.
  2. I would also like to remove the date, category and author at the post carouself and retain just the title in the middle upon mouseover.

Please advise how could I attain that. Thank you

Hi @nebworx,

Thanks for writing in.

Add this in your custom CSS:

.x-post-slider-entry .featured-meta{
   display:none
}

In this case, you need to setup child theme, Then you need to override the file below into your child theme:

x/framework/functions/ethos.php

To make adjustments to the output of the carousel, this code is responsible for the output of post carousel item content:

// Entry Cover
// =============================================================================

if ( ! function_exists( 'x_ethos_entry_cover' ) ) :
  function x_ethos_entry_cover( $location ) {

    if ( $location == 'main-content' ) { ?>

      <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
        <a class="entry-cover" href="<?php the_permalink(); ?>" style="<?php echo x_ethos_entry_cover_background_image_style(); ?>">
          <h2 class="h-entry-cover"><span><?php x_the_alternate_title(); ?></span></h2>
        </a>
      </article>

    <?php } elseif ( $location == 'post-carousel' ) { ?>

      <?php GLOBAL $post_carousel_entry_id; ?>

      <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
        <a class="entry-cover" href="<?php the_permalink(); ?>" style="<?php echo x_ethos_entry_cover_background_image_style(); ?>">
          <h2 class="h-entry-cover"><span><?php ( $post_carousel_entry_id == get_the_ID() ) ? the_title() : x_the_alternate_title(); ?></span></h2>
          <div class="x-post-carousel-meta">
            <span class="entry-cover-author"><?php echo get_the_author(); ?></span>
            <span class="entry-cover-categories"><?php echo x_ethos_post_categories(); ?></span>
            <span class="entry-cover-date"><?php echo get_the_date( 'F j, Y' ); ?></span>
          </div>
        </a>
      </article>

    <?php }

  }
endif;

Hope it helps.

Let us know how it goes.

Thanks. :slight_smile:

Hi,

  1. Works.

  2. I’ve copied ethos.php into the folder: /x-child/framework/functions and made the following edits (just commented out):

     <article <?php post_class(); ?>>
     <a class="entry-cover" href="<?php the_permalink(); ?>" style="<?php echo x_ethos_entry_cover_background_image_style(); ?>">
       <h2 class="h-entry-cover"><span><?php ( $post_carousel_entry_id == get_the_ID() ) ? the_title() : x_the_alternate_title(); ?></span></h2>
       <!--<div class="x-post-carousel-meta">
         <span class="entry-cover-author"><?php echo get_the_author(); ?></span>
         <span class="entry-cover-categories"><?php echo x_ethos_post_categories(); ?></span>
         <span class="entry-cover-date"><?php echo get_the_date( 'F j, Y' ); ?></span>
       </div>-->
     </a>
    

However I do not see the changes being made.

Hi There,

No need to copy the entire file. Please remove ethos.php on your child theme. Then copy the code responsible for that part on your child theme folder functions.php file and edit/commented out those specific part.

Hope this helps.

Brilliant… that did it! Thanks very much… :slight_smile:

Glad to hear that @nebworx. Have a great day!