Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1006745
    nataleszabo
    Participant

    Hey there,
    I’m using Ethos- Child Theme

    My website is http://OldLoveMusic.com

    How can I change the hover text in the posts in the posts carousel?

    I would like to:
    Remove Admin
    Remove Date
    Remove Category
    Add Post Title

    I would ideally like only the title of the post to show up upon hover.

    OR, alternately,

    Is there a way for me to place pages in the carousel, rather than posts?

    Thanks!

    Natale

    #1006772
    Paul R
    Moderator

    Hi Natale,

    Thanks for writing in!

    To achieve that, you can add this 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-title"><?php the_title() ?></span>
              </div>
            </a>
          </article>
    
        <?php }
    
      }
    

    Hope that helps.

    #1007731
    nataleszabo
    Participant

    Worked perfectly, thanks! I am still wondering if there is any way to put pages in the carousel instead of posts?

    #1007732
    nataleszabo
    Participant

    Also, how can I get the title to display fully upon hover, rather than a shortened version?

    #1008013
    Friech
    Moderator

    Hi There,

    You can add this under Custom > CSS in the Customizer.

    .x-post-carousel .x-post-carousel-meta>span {
    	    white-space: normal;
    }

    Regarding the pages on Carousel; It could be possible with custom development, but this would be outside the scope of support we can offer. X is quite extensible with child themes, so there are plenty of possibilities.

    Thanks.

  • <script> jQuery(function($){ $("#no-reply-1006745 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>