Changing hover text for post carousel

How do I change the text that is displayed when I hover over the content of the post carousel on the X Theme?

Right now it shows “entry-cover-author”, “entry-cover-categories” and “entry-cover-date”. How could I change this to just something like “Read more”. I guess I would have to change the HTML - where could I do that?

HI there,

You will have to install and enable the child theme for this and add this code in the functions.php file of the child theme:

// 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 <?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>

            <!-- Add the hover contents here -->

          </div>
        </a>
      </article>

    <?php }

  }
endif;

Hope this helps.

Hello Jade and thank you for your response.

Sorry but this leads to even more confusion. Where can I find this child theme and how would I go along to enable it?

Do I have to replace some existing code with the code you provided me with or do I just add additional spans?

Thank you in advance

Hi there,

You can get the child theme from here.

There are more information about child theme here.

You could freely edit the code however you want depending on what changes you want to do in the carousel view.

Hope this helps.

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