Ethos 01 - Remove Top Slider

Is it possible to remove the multi-post slider at the top of every page? I’m afraid the H2 Tags are carrying over to each post and affecting my SEO. Thanks!

Hi Justin,

Thank you for writing in, please navigate to Theme Options > Ethos

And set the Post Slider for Blog and Post Slider for Archives to Off


Hope it helps,
Cheers!

My apologies, I was actually referring to the Post Carousel. (i.e., the 3 or 4 blocks on the top of every page). Currently, I have it set to “Featured”, but I am realizing that each post displayed in the Carousel also includes an H2 Tag with the name of that post. I believe it may be negatively impacting my on-page SEO efforts.

I would love to be able to either remove the H2 elements from the carousel, or simply remove the carousel from the individual pages, but keep it on the homepage. Does that make sense?

Hello Justin,

If you want to remove the h2 in the post carousel and also in all of the entry covers for Ethos, assuming that the child theme is already set up, please add the following code in your child theme’s functions.php file

// Custom 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(); ?>">
          <div class="h-entry-cover"><span><?php x_the_alternate_title(); ?></span></div>
        </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 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;
// =============================================================================

If you just want to get rid of the post carousel in single posts and display it in the blog index, homepage or archive pages, please add the following code in your child theme’s functions.php file

// Disable Post Carousel in single posts
// =============================================================================
function disable_post_carousel($args) {
    if ( is_single() ) {
        return false;
    }
  return $args;
}
add_filter('x_option_x_ethos_post_carousel_enable', 'disable_post_carousel');
// =============================================================================


We would love to know if this has worked for you. Thank you.

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