Add Revolution Slider to blog-homepage

Hi,

I need some help with tweaking the code to show a revolution slider on the blog-homepage.

This is the code that works for X (not for Pro) and goes into /pro-child/framework/view/renew/wp-header.php.

How should this could be tweaked that it will work?

Thanks!

<?php

// =============================================================================
// VIEWS/INTEGRITY/WP-HEADER.PHP
// -----------------------------------------------------------------------------
// Header output for Integrity.
// =============================================================================

?>

<?php x_get_view( 'global', '_header' ); ?>

  <?php x_get_view( 'global', '_slider-above' ); ?>

  <header class="<?php x_masthead_class(); ?>" role="banner">
    <?php x_get_view( 'global', '_topbar' ); ?>
    <?php x_get_view( 'global', '_navbar' ); ?>
    <?php x_get_view( 'integrity', '_breadcrumbs' ); ?>
  </header>
  
    <?php
    if ( is_home() ) {
      echo '<div class="x-slider-revolution-container below">';
        echo do_shortcode( '[rev_slider alias="homepage"]' );
      echo '</div>';
    }
    ?>

  <?php x_get_view( 'global', '_slider-below' ); ?>
  <?php x_get_view( 'integrity', '_landmark-header' ); ?>

Hi there,

That code should work fine but the file path should be

framework/legacy/cranium/headers/views/renew

Hope this helps.

Hi Jade,

Thanks! I changed the path but it’s still not working. I don’t know why exactly. It looks like the file is not loaded. If, for example, I delete halve the code of the file (which should result in an error) nothing happens.

Any ideas?

Thanks in advance!

Hi there,

Maybe the child theme is not active? Would you mind providing your site’s URL? I like to see it too :slight_smile:

Thanks!

Hi Rad,

That’s what I thought too but I double checked and the Child-theme is active.

Sure! The dev site is http://gd.sanopharm.com.

Hi there,

It will not work since you’re on Pro :slight_smile:

You could try adding your slider shortcode in header text element, and if you just wish to display the slider just in your homepage, then you can duplicate your header then assign the header (with the slider) to your homepage. Then set header with no slider as the global header.

Thanks!

Ahaah! Pro is more powerfull than I thought! Thank you very much!

It is indeed a powerful theme :slight_smile: Keep exploring and keep surprising yourself!

Glad to hear we managed to help!

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