Ethos 1 smart slider in header above navbar

I would like to put a smart slider above the navbar in the header. It will be the same slider on every page. I have the shortcode I just need to know where to put it.
[smartslider3 slider=4]


Thanks,
Krina

Hi Krina,

Thank you for writing in, while that is outside the scope of support, I could point you in the right direction with the understanding that it would ultimately be your responsibility to take it from here.

Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X or PRO update is released.

Then add this to your child theme’s functions.php file.

/**
Add a custom slider on top of the home page
*/
function custom_slider() { 
 if ( is_front_page() ) : ?>
  <div class="x-container custom-slider">
    <?php echo do_shortcode( 'YOUR SLIDER SHORTCODE HERE' ); ?>
  </div>
  <?php endif; 
}
add_action('x_after_site_begin','custom_slider', 30);

Replace the YOUR SLIDER SHORTCODE HERE with an actual shortcode.

Again please be a reminded that further customization from here won’t be supported.

Did you know if you used the Revolution Slider that is bundled with X you can place a slider on top or below the header easily?

Slider Settings: Above Masthead or Below Masthead Feature.

Hope it helps,
Cheers!

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