How do I remove date, Author and category from featured posts on the Header- Ethos1

hello,

In Ethos1 theme, for the featured posts on top, when I take my curser to the post it shows date, author and category of the post. Is there a way to show the title of the post on hover instead of the date, author and category?

Hi There,

Thanks for writing in! First of all, you need to setup a child theme and activate it. Then you can add the following code into your child theme’s functions.php file.

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 <?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 the_title(); ?></span>
          </div>
        </a>
      </article>

    <?php }

  }

Hope that helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.