My post carousel disappeared

My post carousel is no longer visible on my home page. I am using the Ethos stack and the carousel is turned on and set to 4 posts. I am using a custom post type to populate the carousel. My site is https://homeinspectstl.com Please see the included screenshot. Any assistance is greatly appreciated.

Thank you

Hello @mark2inspect,

Thanks for asking. :slight_smile:

PLease try out following solutions:

  1. Ensure everything is up to date according to our version compatibility list here. Please follow the best practices when updating your theme and plugins. Click here for more information.
  2. Test for a plugin conflict. You can do this by deactivating all third-party plugins, and see if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.
  3. Remove custom CSS and Javascript from the options or Child Theme and test the case.
  4. Increase the PHP Memory Limit of your server. Click here for more detailed information and how to increase the PHP memory limit.

If you still have problems kindly get back to us with the result of the steps above and URL/User/Pass of your WordPress dashboard using the Secure Note functionality of the post to follow up the case.

Thank you.

I have checked everything that you asked and everything appears to be up to date and conforming with best practices. I uninstalled all of the plugins except Cornerstone to confirm that there are no plugin contents. I will add a secure note with the credentials.

Hello Mark,

I have checked the console and there seems to be a Javascript error that is causing the carousel not to be displayed:

This is usually caused by a conflict with a third party plugin that is active on the site or some optimization plugin.

Since this is a live site, is there a chance that you can setup a staging site so that we can do the testing there?

Here are some links where you will find information on how to setup a staging site:

In case you are not certain how to proceed, please try to get in touch with your hosting as they might be able to help you out about it.

Once you get the staging site setup, please provide us with the admin access to your site in a Secure Note (key icon under the replies you post/posted):

Thank you.

Please see the attached secure note

Hi Mark,

I tried the link you have provided but the site isn’t accessible:

I created a new staging site and updated the previous secure note with the new information.

Hello @mark2inspect,

I have logged in and carefully investigated your issue. It turns out that you are using a legacy child theme. To resolve this issue, please relocate wp-content/themes/x-child/framework/views/ethos/ folder to wp-content/themes/x-child/framework/legacy/cranium/headers/views/ethos/. You will need to create this folder path in your child theme.

And then you will have to update _post-carousel.php file with the code below which I already did.

<?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 ) : ?>

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

  <?php if ( $wp_query->post_count > 0 ) : ?>

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

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

      <script>

      jQuery(document).ready(function() {
        jQuery('.x-post-carousel').xSlick({
          speed          : 500,
          slide          : 'li',
          slidesToShow   : <?php echo x_get_option( 'x_ethos_post_carousel_display_count_extra_large' ); ?>,
          slidesToScroll : 1,
          rtl            : <?php echo json_encode( is_rtl() ); ?>,
          responsive     : [
            { breakpoint : 1500, settings : { speed : 500, slide : 'li', slidesToShow : <?php echo x_get_option( 'x_ethos_post_carousel_display_count_large' ); ?> } },
            { breakpoint : 1200, settings : { speed : 500, slide : 'li', slidesToShow : <?php echo x_get_option( 'x_ethos_post_carousel_display_count_medium' ); ?> } },
            { breakpoint : 979,  settings : { speed : 500, slide : 'li', slidesToShow : <?php echo x_get_option( 'x_ethos_post_carousel_display_count_small' ); ?> } },
            { breakpoint : 550,  settings : { speed : 500, slide : 'li', slidesToShow : <?php echo x_get_option( 'x_ethos_post_carousel_display_count_extra_small' ); ?> } }
          ]
        });
      });

      </script>

    </ul>

  <?php endif; ?>

  <?php wp_reset_query(); ?>

<?php endif; ?>

Please let us know how it goes.

I have followed your directions and fixed the post-carousel. However, the post carousel is there but the featured images in the 2nd through 4th post positions do not appear. I checked the posts and they all have a feature image set. It also fixed one other bit off css that I hadn’t asked you about yet in another part of the page. Do you have any further advice?

Hello @mark2inspect,

There is no featured image in your post which is why it is not displaying any images in the post carousel. You will need to edit each of your post and add a featured image in order to resolve this issue. To know more about featured image, please check this codex: https://codex.wordpress.org/Post_Thumbnails

Hope this helps. Kindly let us know.

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