Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #210510

    joanosgoodby
    Participant

    Can you please tell me how to disable the mouse-ever effect on the posts carousel that displays post category, date, etc.

    Also to remove the semi-transparent band on bottom that displays post title.

    I only want images showing – nothing else (except scrolling left/right arrows need to stay).

    Thanks!!!

    http://wp.yumirestaurant.com/

    #210779

    Senthil
    Member

    Hi There,

    Thanks for writing in!

    Please add the following CSS in your Appearance > Customize > Custom > CSS and it will remove all the hover elements except the arrows.

    .x-post-carousel-meta,
    .h-entry-cover {
    	display:none;
    }
    

    Hope it helps, thanks!

    #211054

    joanosgoodby
    Participant

    It worked like a charm. Thanks!!!

    #211055

    joanosgoodby
    Participant

    Can I set the carousel to auto play?

    #211104

    joanosgoodby
    Participant

    I copied the _post_carousel.php to the child theme: wp-content\themes\x-child-ethos\framework\views\ethos
    and made alterations to autoplay, but still not working.

    Here is the code:

    <?php

    // =============================================================================
    // VIEWS/ETHOS/_POST-CAROUSEL.PHP
    // —————————————————————————–
    // Outputs the post carousel that appears at the top of the masthead.
    // =============================================================================

    GLOBAL $post_carousel_entry_id;

    $post_carousel_entry_id = get_the_ID();

    $is_enabled = x_get_option( ‘x_ethos_post_carousel_enable’, ” ) == ‘1’;
    $count = x_get_option( ‘x_ethos_post_carousel_count’ );
    $display = x_get_option( ‘x_ethos_post_carousel_display’ );

    switch ( $display ) {
    case ‘most-commented’ :
    $args = array(
    ‘post_type’ => ‘post’,
    ‘posts_per_page’ => $count,
    ‘orderby’ => ‘comment_count’,
    ‘order’ => ‘DESC’
    );
    break;
    case ‘random’ :
    $args = array(
    ‘post_type’ => ‘post’,
    ‘posts_per_page’ => $count,
    ‘orderby’ => ‘rand’
    );
    break;
    case ‘featured’ :
    $args = array(
    ‘post_type’ => ‘post’,
    ‘posts_per_page’ => $count,
    ‘orderby’ => ‘date’,
    ‘meta_key’ => ‘_x_ethos_post_carousel_display’,
    ‘meta_value’ => ‘on’
    );
    break;
    }

    ?>

    <?php if ( $is_enabled ) : ?>

    <ul class=”x-post-carousel unstyled”>

    <?php $wp_query = new WP_Query( $args ); ?>

    <?php if ( $wp_query->have_posts() ) : ?>
    <?php while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>

    <li class=”x-post-carousel-item”>
    <?php x_ethos_entry_cover( ‘post-carousel’ ); ?>

    <?php endwhile; ?>
    <?php endif; ?>

    <?php wp_reset_query(); ?>

    <script>

    jQuery(document).ready(function() {
    if (jQuery(‘.home’).length) {
    jQuery(‘.x-post-carousel’).slick({
    infinite : true,
    speed : 500,
    slide : ‘li’,
    slidesToShow : <?php echo x_get_option( ‘x_ethos_post_carousel_display_count_extra_large’ ); ?>,
    slidesToScroll : 1,
    autoplay : true,
    autoplaySpeed : 2000,
    responsive : [
    { breakpoint : 1500, settings : { speed : 500, slide : ‘li’, autoplay : true, autoplaySpeed : 2000, slidesToShow : <?php echo x_get_option( ‘x_ethos_post_carousel_display_count_large’ ); ?> } },
    { breakpoint : 1200, settings : { speed : 500, slide : ‘li’, autoplay : true, autoplaySpeed : 2000, slidesToShow : <?php echo x_get_option( ‘x_ethos_post_carousel_display_count_medium’ ); ?> } },
    { breakpoint : 979, settings : { speed : 500, slide : ‘li’, autoplay : true, autoplaySpeed : 2000, slidesToShow : <?php echo x_get_option( ‘x_ethos_post_carousel_display_count_small’ ); ?> } },
    { breakpoint : 550, settings : { speed : 500, slide : ‘li’, autoplay : true, autoplaySpeed : 2000, slidesToShow : <?php echo x_get_option( ‘x_ethos_post_carousel_display_count_extra_small’ ); ?> } }
    ]
    });
    });
    };
    else{
    jQuery(‘.x-post-carousel’).slick({
    infinite : true,
    autoplay : true,
    speed : 500,
    slide : ‘li’,
    slidesToShow : <?php echo x_get_option( ‘x_ethos_post_carousel_display_count_extra_large’ ); ?>,
    slidesToScroll : 1,
    responsive : [
    { breakpoint : 1500, settings : { speed : 500, slide : ‘li’, autoplay : true, autoplaySpeed : 2000, slidesToShow : <?php echo x_get_option( ‘x_ethos_post_carousel_display_count_large’ ); ?> } },
    { breakpoint : 1200, settings : { speed : 500, slide : ‘li’, autoplay : true, autoplaySpeed : 2000, slidesToShow : <?php echo x_get_option( ‘x_ethos_post_carousel_display_count_medium’ ); ?> } },
    { breakpoint : 979, settings : { speed : 500, slide : ‘li’, autoplay : true, autoplaySpeed : 2000, slidesToShow : <?php echo x_get_option( ‘x_ethos_post_carousel_display_count_small’ ); ?> } },
    { breakpoint : 550, settings : { speed : 500, slide : ‘li’, autoplay : true, autoplaySpeed : 2000, slidesToShow : <?php echo x_get_option( ‘x_ethos_post_carousel_display_count_extra_small’ ); ?> } }
    ]
    });
    });
    };

    </script>

    <?php endif; ?>

    #211490

    Rue Nel
    Moderator

    Hi There,

    I will paste the same code with will make the post slider automatically play when loaded.

    // x-child/framework/views/ethos/_post-carousel.php

    
    <?php
    
    // =============================================================================
    // VIEWS/ETHOS/_POST-CAROUSEL.PHP
    // -----------------------------------------------------------------------------
    // Outputs the post carousel that appears at the top of the masthead.
    // =============================================================================
    
    GLOBAL $post_carousel_entry_id;
    
    $post_carousel_entry_id = get_the_ID();
    
    $is_enabled = x_get_option( 'x_ethos_post_carousel_enable', '' ) == '1';
    $count      = x_get_option( 'x_ethos_post_carousel_count' );
    $display    = x_get_option( 'x_ethos_post_carousel_display' );
    
    switch ( $display ) {
      case 'most-commented' :
        $args = array(
          'post_type'      => 'post',
          'posts_per_page' => $count,
          'orderby'        => 'comment_count',
          'order'          => 'DESC'
        );
        break;
      case 'random' :
        $args = array(
          'post_type'      => 'post',
          'posts_per_page' => $count,
          'orderby'        => 'rand'
        );
        break;
      case 'featured' :
        $args = array(
          'post_type'      => 'post',
          'posts_per_page' => $count,
          'orderby'        => 'date',
          'meta_key'       => '_x_ethos_post_carousel_display',
          'meta_value'     => 'on'
        );
        break;
    }
    
    ?>
    
    <?php if ( $is_enabled ) : ?>
    
      <ul class="x-post-carousel unstyled">
    
        <?php $wp_query = new WP_Query( $args ); ?>
    
        <?php if ( $wp_query->have_posts() ) : ?>
          <?php while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>
    
            <li class="x-post-carousel-item">
              <?php x_ethos_entry_cover( 'post-carousel' ); ?>
            </li>
    
          <?php endwhile; ?>
        <?php endif; ?>
    
        <?php wp_reset_query(); ?>
    
        <script>
    
        jQuery(document).ready(function() {
          jQuery('.x-post-carousel').slick({
            speed          : 500,
            slide          : 'li',
            slidesToShow   : <?php echo x_get_option( 'x_ethos_post_carousel_display_count_extra_large', '5' ); ?>,
            slidesToScroll : 1,
            autoplay       : true,
            responsive     : [
              { breakpoint : 1500, settings : { speed : 500, slide : 'li', slidesToShow : <?php echo x_get_option( 'x_ethos_post_carousel_display_count_large', '4' ); ?> } },
              { breakpoint : 1200, settings : { speed : 500, slide : 'li', slidesToShow : <?php echo x_get_option( 'x_ethos_post_carousel_display_count_medium', '3' ); ?> } },
              { breakpoint : 979,  settings : { speed : 500, slide : 'li', slidesToShow : <?php echo x_get_option( 'x_ethos_post_carousel_display_count_small', '2' ); ?> } },
              { breakpoint : 550,  settings : { speed : 500, slide : 'li', slidesToShow : <?php echo x_get_option( 'x_ethos_post_carousel_display_count_extra_small', '1' ); ?> } }
            ]
          });
        });
    
        </script>
    
      </ul>
    
    <?php endif; ?>
    

    Please let us know if this helps you