Change carousel hover text without changing code?

I’d like to change the text that appears when the cursor hovers over the carousel posts. Currently it shows the author, the categories of the post, and the date. Is there a way to change this without editing any code? I don’t have much experience editing code, so am hesitant to make changes.

I’m using the ethos stack.

Thanks

Hi Irena,

Unfortunately, there is no option available to change that information. If you are interested we can give you a CSS code that you can hide parts of the information but you can not change the information and add new stuff without doing a PHP customization which is outside of our support scope.

But if you want to hide, please tell us which info you want to hide and we will give you a CSS code which you can add to X > Theme Options > CSS.

Thank you.

Okay, thanks.

The text that shows is the following, each field on a seperate line.

  • Author
  • Category(ies)
  • Date posted

I would prefer that either no text shows up when hovering, or just generic “View Post”.

Also, is it really as simple as pasting the CSS code in the CSS section? I have not installed a child theme - should I do that first?

Thanks

Hi Irene,

Yes, we can hide the meta post in the carousel with a CSS. Please add this to X > Theme Options > CSS

.x-post-carousel-meta {
	display: none !important;
}

Hope it helps,
Cheers!

Thanks. How can I add generic text like “View Post”.

Hi,

To change it to View Post, please remove the css provided by Friech then add the code below in 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"></span>
            <span class="entry-cover-categories">View Post</span>
            <span class="entry-cover-date"></span>
          </div>
        </a>
      </article>

    <?php }

  }

Hope that helps.

1 Like

Thanks. However, I have not setup a child theme. Can you direct me to some documentation on how to do that?

Thanks.

Hi There,

Please take a look at this article: https://theme.co/apex/forum/t/setup-how-to-setup-child-themes/57.

Hope it helps :slight_smile:

Thank you so much for your help! I will review this documentation and start a new thread if I have further questions.

Thanks!

You’re welcome.

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