Losing front page slider with Ethos stack after upgrade

My site (www.viro-instituutti.fi) broke after updating from Theme X version 7.1.2 to 9.1.4 and Cornerstone 4.2.3 to 6.1.4.

I am using the Ethos stack and I lost the front page slider after the update so that there’s just white space where the slider used to be. Even though i use a child theme with some custom php files, the slider is also missing under X Theme directly (without any child theme modifications), even when I go to Theme Options and turn on Post Slider (Blog) or (Archive).

Can you please help me get to the bottom of it?

The site is using Under Construction plugin, so log in to see the issue.

Hello @juhani,

Thanks for writing to us.

I tried to access your site but it seems that the given login details are not working. Please recheck and send us again. There might be the issue of plugin conflict or cache issue, I would suggest you troubleshoot with a few of the common issues before we investigate your settings.

If none of those work, it would be best if you could copying your live website to your staging area. and send your details in a secure note so that we can investigate your setting without breaking your live site. Please provide the following details

  • WordPress Login URL
  • Admin level username and password

You can find the Secure Note button at the bottom of your posts

Thanks

I’m sorry, you are right, i had made a typo in the username. Now it’s correct and will work. Could you please check again?!

I’m not very much interested in setting up a stagin site just for this one issue on this otherwise pretty simple site and I do have backups made with UpdraftPlus so that i could go back to the earlier version if nothing else works or if you/I manage to actually break my site while fixing it.

Okay, I went through the Common Issues article and tried everything there. Apparenly it was indeed a plugin conflict with the Smush plugin, so now I’ve got the slider back when i deactivate it. Why is that? Smush is such a popular and well tested plugin.

However, the slider and site still acts very funny. First of all I lost the left and right hand side arrows to go through different slides. Then in Theme Options the “Post Slider (Blog)” does not seem to do much. I can control the Height, but turning the slider on/off doesn’t do anything and “Display: Featured/Random/Most Commented” does nothing. Under Ethos Post Settings turning on “Post Carousel Display” or “Post Slider Display – Blog” also does not work. The only way to make the post image appear on the front page slider and top carousel is to turn on “Stick to the top of the blog”.

All these problems persist if I now turn off my child theme and use the parent Theme X. Quite the contrary, the slider disappears completely, even without the white space.

Could you please look into it ASAP?!

Hello @juhani,

I am seeing this setting in the Theme Options.

Perhaps, you have a server or caching problems. You might want to check out this documentation:

I also noticed that some of the plugins is out of date. Please make sure that everything is updated. You can find out the latest supported and available versions here:

Best Regards.

Yes I am also seeing the same thing in the Theme Options. So? I’m saying it does not work, it does not control the slider, it does not turn it on or off, it is missing many features, the arrows etc. Please read my post above properly. These kinds of general responses do not help me in any way.

I also updated the plugins that you referred to (that X theme had released as separate plugin installs and thus had not been updated automatically by wordpress), but that’s completely irrelevant here. I will try to turn off any caching at the server level.

My hosting provider says they are not using any caching on the server level and neither am I within Wordpress. I think the issue is still with X Theme or Cornerstone, or possibly with my child theme, but disabling it still does not solve the issue. Please investigate ASAP!

Hi @juhani,

I have checked the Front page and found the Slider is working fine. Can you please provide any screenshots marked with the issue or any video that helps us to recognize the problem?

Thanks

No it is not working fine. Can you go through different slides in the slider panel? I cannot see any way to do it. Can you add additonal posts in the slider? No. I cannot control what appers in the slider, only the last sticky post seems to be pulled up there. But the theme ignores the “Post Slider Display – Blog” checkbox in the Ethos Post settings.

This is what i get (on the screenshot) when I disable my child theme (and loose all my styling) and use the X Theme directly. The carousel seems to be working to certain extent, but there is no Blog nor Archive slider on the front page even though i have turned them on.

If I use my child theme then the slider is indeed pulled up because of modified ethos pages in my frameworks>views directory, but again, it does not work as it used to. I cannot control what appears in the slider and there are no arrows to slide through different posts.

New Theme X slider with child theme active and no navigation arrows:

Old Theme X slider with navigation arrows:

Ethos post settings checkboxes not working:

If you cannot take my issue seriously and actually help me get this sorted, then i’m afraid i just have to revert back to the very old install of your plugin, and eventually start moving away from your service altogether.

Hello @juhani,

Thanks for the updates. I have investigated your child theme and I can see that you have added custom features and functions in there. I also noticed that you are using the legacy theme files which we have moved its folder locations from wp-content/themes/x/framework/views/ethos/ to wp-content/themes/x/framework/legacy/cranium/headers/views/ethos/.

To get tis sorted out, you need to check the locations of these files in the latest version and place those files in your child theme’s folder from wp-content/themes/x-child/framework/views/ethos/ to wp-content/themes/x-child/framework/legacy/cranium/headers/views/ethos/.

Be advised that these file modifications will have to be checked by you or someone who made these modifications every after theme and plugin updates to make sure the modifications are still working or has to be updated with the new codes to make it work again.

Having said that, I have inspected one of the files and compared with the latest version of theme. I found out that in your child theme, the contents of your _post-slider.php is this:

<?php

// =============================================================================
// VIEWS/ETHOS/_POST-SLIDER.PHP
// -----------------------------------------------------------------------------
// Outputs the post slider that appears at the top of the blog.
// =============================================================================

$is_blog    = is_home() || is_front_page();
$is_archive = is_category() || is_tag();

if ( $is_blog || $is_archive ) :

  if ( $is_blog || is_front_page()) {
    $info = array( 'blog', NULL, NULL, '_x_ethos_post_slider_blog_display' );
  } elseif ( $is_archive ) {
    $type = ( is_category() ) ? 'cat' : 'tag_id';
    $info = array( 'archive', $type, get_queried_object_id(), '_x_ethos_post_slider_archives_display' );
  }

  $slider_enabled = x_get_option( 'x_ethos_post_slider_' . $info[0] . '_enable', '' ) == '1';
  $count          = x_get_option( 'x_ethos_post_slider_' . $info[0] . '_count' );
  $display        = x_get_option( 'x_ethos_post_slider_' . $info[0] . '_display' );

  $blog_slider_is_enabled    = $slider_enabled && $is_blog;
  $archive_slider_is_enabled = $slider_enabled && $is_archive;
  $is_enabled                = $blog_slider_is_enabled || $archive_slider_is_enabled;

  switch ( $display ) {
    case 'most-commented' :
      $args = array(
        'post_type'      => 'post',
        'posts_per_page' => $count,
        'orderby'        => 'comment_count',
        'order'          => 'DESC',
        $info[1]         => $info[2]
      );
      break;
    case 'random' :
      $args = array(
        'post_type'      => 'post',
        'posts_per_page' => $count,
        'orderby'        => 'rand',
        $info[1]         => $info[2]
      );
      break;
    case 'featured' :
      $args = array(
        'post_type'      => 'post',
        'posts_per_page' => $count,
        'orderby'        => 'date',
        'meta_key'       => $info[3],
        'meta_value'     => 'on'
      );
      break;
  }

  ?>

  <?php if ( $is_enabled || is_front_page() ) : ?>

    <div class="x-flexslider x-post-slider">
      <ul class="x-slides">

        <?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-slide">
              <article <?php post_class( 'x-post-slider-entry' ); ?> style="<?php echo x_ethos_entry_cover_background_image_style(); ?>">
                <a href="<?php the_permalink(); ?>">
                  <div class="cover">
                    <div class="middle">
                      <?php if (get_post_meta( get_the_ID(), 'custom-author', true )) { ?>
                      	<span class="featured-meta custom-author custom-author-slider"><?php echo get_post_meta( get_the_ID(), 'custom-author', true ); ?></span>
                      	<?php } else { ?>
                      		<span class="featured-meta custom-date custom-date-slider"><?php echo get_post_meta( get_the_ID(), 'custom-date', true ); ?></span>
                      <?php } ?><br>
                      <?php if (get_post_meta( get_the_ID(), 'custom-location', true )) { ?>
                      	<span class="featured-meta custom-location custom-location-slider"><?php echo get_post_meta( get_the_ID(), 'custom-location', true ); ?></span>
                      <?php } ?>
                      <h2 class="h-featured"><span><?php x_the_alternate_title(); ?></span></h2>
                      <span class="featured-view"><?php _e( 'Lue lisää', '__x__' ); ?></span>
                    </div>
                  </div>
                </a>
              </article>
            </li>

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

        <?php wp_reset_query(); ?>

      </ul>
    </div>

    <script>
      jQuery(window).load(function() {
        jQuery('.x-post-slider').flexslider({
          controlNav   : false,
          selector     : '.x-slides > li',
          prevText     : '<i class="x-icon-chevron-left" data-x-icon="&#xf053;"></i>',
          nextText     : '<i class="x-icon-chevron-right" data-x-icon="&#xf054;"></i>',
          animation    : 'fade',
          smoothHeight : true,
          slideshow    : true
        });
      });
    </script>

  <?php endif; ?>

<?php endif; ?>

And in the latest version of the theme, the content codes is this:

<?php

// =============================================================================
// VIEWS/ETHOS/_POST-SLIDER.PHP
// -----------------------------------------------------------------------------
// Outputs the post slider that appears at the top of the blog.
// =============================================================================

$is_blog    = is_home();
$is_archive = is_category() || is_tag();

if ( $is_blog || $is_archive ) :

  if ( $is_blog ) {
    $info = array( 'blog', NULL, NULL, '_x_ethos_post_slider_blog_display' );
  } elseif ( $is_archive ) {
    $type = ( is_category() ) ? 'cat' : 'tag_id';
    $info = array( 'archive', $type, get_queried_object_id(), '_x_ethos_post_slider_archives_display' );
  }

  $slider_enabled = x_get_option( 'x_ethos_post_slider_' . $info[0] . '_enable' ) == '1';
  $count          = x_get_option( 'x_ethos_post_slider_' . $info[0] . '_count' );
  $display        = x_get_option( 'x_ethos_post_slider_' . $info[0] . '_display' );

  $blog_slider_is_enabled    = $slider_enabled && $is_blog;
  $archive_slider_is_enabled = $slider_enabled && $is_archive;
  $is_enabled                = $blog_slider_is_enabled || $archive_slider_is_enabled;

  switch ( $display ) {
    case 'most-commented' :
      $args = array(
        'post_type'      => 'post',
        'posts_per_page' => $count,
        'orderby'        => 'comment_count',
        'order'          => 'DESC',
        $info[1]         => $info[2]
      );
      break;
    case 'random' :
      $args = array(
        'post_type'      => 'post',
        'posts_per_page' => $count,
        'orderby'        => 'rand',
        $info[1]         => $info[2]
      );
      break;
    case 'featured' :
      $args = array(
        'post_type'      => 'post',
        'posts_per_page' => $count,
        'orderby'        => 'date',
        'meta_key'       => $info[3],
        'meta_value'     => 'on',
        'ignore_sticky_posts'	=> true
      );
      break;
  }

  ?>


  <?php if ( $is_enabled ) : ?>


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

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

      <?php wp_enqueue_script( 'cs-flexslider' ); ?>

      <div class="x-flexslider x-post-slider">
        <ul class="x-slides">

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

              <li class="x-slide">
                <article <?php post_class( 'x-post-slider-entry' ); ?> style="<?php echo x_ethos_entry_cover_background_image_style(); ?>">
                  <a href="<?php the_permalink(); ?>">
                    <div class="cover">
                      <div class="middle">
                        <span class="featured-meta"><?php echo x_ethos_post_categories(); ?> / <?php echo get_the_date( 'F j, Y' ); ?></span>
                        <h2 class="h-featured"><span><?php x_the_alternate_title(); ?></span></h2>
                        <span class="featured-view"><?php _e( 'View Post', '__x__' ); ?></span>
                      </div>
                    </div>
                  </a>
                </article>
              </li>

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

        </ul>
      </div>

    <?php endif; ?>

    <?php wp_reset_query(); ?>

  <?php endif; ?>

<?php endif; ?>

Your _post-slider.php file need to be in the correct, updated location and has to have the latest codes integrated to to your file to keep your modifications in tact and at the same time it still works with the latest version of the theme.

Be advised that custom coding and theme file modifications are beyond the scope of our support under our Support Policy. If you are unfamiliar with code and resolving potential conflicts, you may select our One service for further assistance.

Thank you for your understanding.

Ok, thanks for checking this out for me. I will try to move my frameworks files to new locations and see what happens.

But how do you explain this? This is your latest X Theme out of the box not showing any slider even though the Post Slider (Blog) and Post Slider (Archive) is both turned on?

I could build a new front page but without this working even out of the box, I think I simply have to revert back to the old version for now.

Hello @juhani,

Yes, the slider will not display because the post slider is only allowed in the blog index and no longer displayed on the homepage. You can check this line in your child theme’s _post-slider.php file:
$is_blog = is_home() || is_front_page();

while on the latest version, you only have this line:
$is_blog = is_home();

In the latest version, the post slider will be visible in blog index and archive pages. It is no longer be allowed to display on the homepage which is why it is not displaying on your end. Having to properly placed the _post-slider.php file in the correct location in your child theme should resolve the issue.

Best Regards.

None of this works unfortunately, and I cannot keep my client waiting like this. I have made all these custom modifications to the site myself, but that was many years ago and it is not possible for me to start troubleshooting and tinkering with the code line by line right now just because you decided to modify the structural framework of your theme at some point without any graceful degradation for those who had modified their sites.

If you are not willing to help me any further on this issue, could you at least give me the lastest version of your theme and cornerstone builder with the older specification and structure that would not break my site. As of now I have reverted back to Theme X 7.1.2 and Cornerstone 4.2.3.

Hey @juhani

WordPress, and everything within the system including themes and plugins has the potential for breaking changes. As a user, it’s is our responsibility to check everything in WordPress making sure they work month by month. Also, it is a site developer’s responsibility to update his or her modifications.

That’s not possible.

Thank you for understanding.

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