How is this done?

The top part of:
http://demo.theme.co/ethos-1/

I’m using the Ethos 3 template, but like the look of what’s going on there.

Hi Jason,

Thanks for reaching out.

Please check this https://theme.co/apex/forum/t/customizer-ethos-options/131, under Post Carousel and Post Slider option. It’s old, but still the same options and features under Theme Options instead of Customizer.

Though, the Post slider will not work on your Ethos 3 page, it’s only applicable for blog and archive pages.

Thanks!

Is there a way to change what post type is displayed?

Hi Jason,

That’s possible, please check this to give you an idea of how template customization is usually done.

https://theme.co/apex/forum/t/customizations-best-practices/205,
https://theme.co/apex/forum/t/how-to-upload-xtheme-to-child-theme/43246/2,

Then, let’s continue :slight_smile:

  1. Please copy these files from your main theme to your child theme

\framework\legacy\cranium\headers\views\ethos\_post-carousel.php
\framework\views\ethos\_post-slider.php

You should have this file path in your child theme

\x-child\framework\legacy\cranium\headers\views\ethos\_post-carousel.php
\x-child\framework\views\ethos\_post-slider.php

  1. Edit your child theme’s _post-carousel.php and _post-slider.php and change the post type from

'post_type' => 'post',

to your preferred post type, like

'post_type' => 'product',

  1. Save and upload them overwriting the files already in your child theme.

Hope this helps :slight_smile:

Thank you for your help. It works perfectly. Is there a way to only show it on the home page?

For the Post Slider, edit:

\framework\views\ethos\wp-index.php

In that file, wrap x_get_view( 'ethos', '_post', 'slider' ); with the is_home WordPress Conditional.

For the Post Carousel, edit:

framework\legacy\cranium\headers\views\ethoswp-header.php

Wrap x_get_view( 'ethos', '_post', 'carousel' ); with the same conditional above.

Please note that the WordPress conditionals are part of WordPress development and custom coding them would be the user’s responsibility. Issues that will arise from the use of custom codes even taken from this forum and further enhancements of the code should be fixed by you or a third party developer.

Hope that helps and thank you for understanding.

I wrapped it around the is_front_page() and it seems to work. Thank you for your help.

You are most welcome. :slight_smile:

Where is the name and date information being pulled from? I wanted to remove the name.

Hello Jason,

Thanks for updating the thread. :slight_smile:

If you want to remove the Author name, please add following CSS under X > Theme Options > CSS:

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

To remove date, please add following CSS under X > Theme Options > CSS:

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

1- I have found the proper CSS code selector using the Chrome browser Developer Toolbar: https://www.youtube.com/watch?v=wcFnnxfA70g

2- For the CSS code itself, I suggest that you get started with this tutorial: https://www.youtube.com/watch?v=yfoY53QXEnI

Thanks.

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