Ethos - Rotating post carousel in individual post page top too

Hi,

How can I have the rotating post carousel inside the individual post page also.

http://demo.theme.co/ethos-1/

http://demo.theme.co/ethos-1/country-living-made-simple/

Your help is appreciated.

Many thanks

Hey,

I need to check your settings to know why your carousel isn’t showing. Please, would you provide to us your WP credentials and the website link in a secure note?

Hi John,

Here are the credentials

What I want to do is to have the home page post carousel to appear in single post pages too.

Appreciate your help.

Many thanks
Dee

Hi Dee,

I have move your credentials on a secure note. Please remember not to share sensitive information publicly. Always use a secure note. Now I can’t access the URL you have shared. It says 502 BAD GATEWAY. Please double check that with your hosting provider.

Hi Lely,

For some reason it has gone down. They are working On it.

But in the mean time you can check the staging site please
http://charistek.com/emovyz/

We will migrate the site back again once the hosting guys have resolved the issue.

Many thanks

Hi,

I went ahead and enable the post carousel.

It now shows in your home page and posts page.

http://charistek.com/emovyz/
http://charistek.com/emovyz/emovyz-showcase-voice-audience-capabilities-future-tourism-summit-2017

Hi,
Thanks for doing this.

Sorry if I was not clear enough. But I was referring to the posts hero slider. I need help to have the same slider in single posts please.

Many thanks

Hi there,

I see, you wish to display that slider in single post. In that case, please follow this :slight_smile:

  1. Using your hosting’s file manager or FTP client, please duplicate this file _post-slider.php

from \wp-content\themes\x\framework\views\ethos\
to \wp-content\themes\x-child\framework\views\ethos\

(assuming you already installed a child theme)

  1. Edit the duplicated _post-slider.php and replace this code
  $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;

with this

  $slider_enabled = is_singular('post') ? x_get_option( 'x_ethos_post_slider_blog_enable' ) == '1' : x_get_option( 'x_ethos_post_slider_' . $info[0] . '_enable' ) == '1';
  $count          = is_singular('post') ? x_get_option( 'x_ethos_post_slider_blog_count' ) :x_get_option( 'x_ethos_post_slider_' . $info[0] . '_count' );
  $display        = is_singular('post') ? x_get_option( 'x_ethos_post_slider_blog_display' ) : x_get_option( 'x_ethos_post_slider_' . $info[0] . '_display' );

  $blog_slider_is_enabled    = $slider_enabled && ( $is_blog || is_singular('post') );
  $archive_slider_is_enabled = $slider_enabled && $is_archive;
  $is_enabled                = $blog_slider_is_enabled || $archive_slider_is_enabled;

  1. Save and upload it.

It will inherit the post slider setting under your blog instead of archive from X > Launch > Options.

Thanks!

Hi Rad,

Appreciate your input.

I already have the x-child theme installed. So I followed your instructions and dd the change to the _post-slider.php page and uploaded to the …themes/x-child/framework/views/ethos folder. But still no success.

Please help.

Thanks

Hello There,

If still does not display in single posts, please do the following:
1] Using Notepad or TextEdit or Sublime Text or any text editor, please create a new file in your local machine.
2] Insert the following code into that new file

<?php

// =============================================================================
// VIEWS/ETHOS/WP-SINGLE.PHP
// -----------------------------------------------------------------------------
// Single post output for Ethos.
// =============================================================================

$fullwidth = get_post_meta( get_the_ID(), '_x_post_layout', true );

?>

<?php get_header(); ?>
  
  <div class="x-container max width main">

    <?php x_get_view( 'ethos', '_post', 'slider' ); ?>
    
    <div class="offset cf">
      <div class="<?php x_main_content_class(); ?>" role="main">

        <?php while ( have_posts() ) : the_post(); ?>
          <?php x_get_view( 'ethos', 'content', get_post_format() ); ?>
          <?php x_get_view( 'global', '_comments-template' ); ?>
        <?php endwhile; ?>

      </div>

      <?php if ( $fullwidth != 'on' ) : ?>
        <?php get_sidebar(); ?>
      <?php endif; ?>

    </div>
  </div>

<?php get_footer(); ?>

3] Save the file named as wp-single.php
4] Upload this file to your server in the child theme’s folder wp-content/themes/x-child/framework/views/ethos/

Please let us know how it goes.

Hi RueNel,

I did exactly what you did. But still no success.

Thanks for your help
.

Hi,

Thank you for providing your ftp login.

I went ahead and fix it by changing this line

if ($is_blog || $is_archive ) :

with this

if (is_singular('post') || $is_blog || $is_archive ) :

Please also note that you don’t need to copy all files in ethos folder, you only need to copy the file that you want to modify.

In this case _post-slider.php

Hope that helps.

Thank you so much. Really appreciate your support.

You are most welcome!