Ethos Post Carousel Links Disappeared

Hey Support,

I just updated to the new version of the X-theme and my post carousel is now gone. The holding spots are all there, but blank. I didn’t change anything within the featured posts (x_ethos_post_carousel_display = on). Any suggestions???

Thanks!

Hi,

Upon checking, I can see the following errors in the console.

Please note that you don’t need to add scripts tags when adding scripts in Theme Options > JS

Kindly remove the scripts you added in Theme Options > JS.

To add them, you can install this third party plugin and those in Scripts in Header

If after doing that it still doesn’t work, you could try testing for a plugin conflict. You can do this by deactivating all third party plugins, and seeing 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.

Let us know how it goes!

Hey Paul,

I removed the java script and disabled all plug-ins except for cornerstone, it still appears the same. I’d appreciate if you could take another look. Thanks!

For now I put the Java script back as it is making my sharethis shares appear and is not affecting this issue.

Thanks!

Hi @jfbball7,

If you really need it there then you should change your embed code to this

</script>
<script type="text/javascript">var switchTo5x=true;</script>
<script type="text/javascript" src="https://ws.sharethis.com/button/buttons.js"></script>
<script type="text/javascript">stLight.options({publisher: "13027ad8-0bde-460d-b896-aba81b074155", doNotHash: false, doNotCopy: false, hashAddressBar: false});</script>

That’s to prevent errors, and even if it’s not the cause, it can still cause issues. I went ahead and applied it. Now, there is one single error and it’s the slick() function of the carousel. Have you done the plugin conflict test? If yes, please allow me to disable them myself, and I need confirmation from you since it’s a live site.

Thanks!

Hey Rad,

Thanks for fixing that JS for me!

I did the plugin conflict test via the Health Check plugin and with everything disabled except cornerstone. I unfortunately can’t disable the plugins as I just launched a new podcast yesterday and I don’t want the feed to get messed. Any suggestions? Thanks!

Hi again,

I did some deep testing and I see your child theme is causing the problem, you’ve customization in your child theme which is breaking the post carousel, please review your customization in your child theme and remove the conflicting code to fix the issue.

Cheers!

Hey Nabeel,

Thanks for checking for me! I really don’t have any customization in my child theme except for removing some woocommerce checkout items (which I was given by your staff). Can you please point to what is the conflicting code to fix the issue? I haven’t changed any of that code in a long time, my only change was updating the X-theme in the past few days which leads me to believe that was the cause of the issue.

Thanks for looking again!

Hi There,

When I have switched to your parent X theme, your post carousel functioned properly, which means the issue is related to your child theme customization.

To check your child theme files, we require your FTP credentials. You can include your FTP credentials in a secure note to check this issue further.

Thanks!

Thanks for figuring that out!! I’ve given FTP credentials, the only functionality I see that isn’t working is"

  1. My sharethis shares which was changed in the child theme framework/views/ethos/wp-single.php
  2. My changes to use the x carousel for featured posts, which I believe i changed in the postslider php

I would love if it’s possible to get the child theme running and I can switch it back to my featured posts and also get my shares as I have 100’sk of shares I’d like to not lose. Thanks for your help support, you guys are awesome!

Once Final thing, I tried using the x-theme and switch to the featured posts (which I was using before), with

Hi There,

The FTP credentials did not work, please confirm. I advise that you remove/rename that _post-carousel.php file on your child theme as there are changes made on that file now (X6), remove/rename that file and see if the normal functionality of carousel gets back. If it does then that confirms the modification on that file causes the issue.

Thanks,

Try the FTP credentials again please, thanks!

Hello There,

It turns out that you are using a legacy child theme. Please have it updated by relocating the _post-carousel.php from /wp-content/themes/x-child/framework/views/ethos to this new folder location /wp-content/themes/x-child/framework/legacy/cranium/headers/views/ethos/.

And the new contents of the post carousel file should be this:

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

Feel free to add your customizations and modifications if you have added in your old file.

Please let us know how it goes.

Hey There,

Thanks for responding. I updated to a new x child theme, but I’m not finding that folder to put the new code. Where is it???

Hi There,

Please create the folder and sub-folder if they’re existed:

Regards!

Thanks! I added the folder and updated the code as above, still no ethos featured posts showing up. Thoughts?

I did a little further testing, and I don’t think it’s the child theme. If I switch to the X theme the carousel works for most commented and random, but does not work for featured.

Something changed with how the features posts are handled since the last x update .

Hi @jfbball7,

Maybe you didn’t set the featured post yet? The old one is by manually adding the post ID. Example, edit your selected post and go to Ethos post settings section and turn on the option for featured.

Thanks!

Hey Rad,

That options works for posts, I have specific pages set to featured with the x_ethos_post_carousel_display on.

Can you please look into this? Specific page example:

Hi There,

The path of directory you created wasn’t correct: x-child/framework/cranium/headers/views/ethos.

It should be like this: x-child/framework/legacy/cranium/headers/views/ethos.

I’ve already corrected it, the post carousel is displaying fine now:

Cheers!

Hey Thai,

When it’s set to featured, this is what I see:

If I set it to random it appears again:

What do I need to do to get my featured posts back?!?