• Resolved ckndancemama

    (@ckndancemama)


    Hi there!

    Thank you for creating such an amazing theme with awesome support. I try very hard to read through all the forums to get my answers. This is the first time I’ve had to post.

    Here’s my issue.

    I am running Customizr Pro and have added the extra header widget. If I embed slider revolution in the extra header widget it works beautifully. Problem is I want to be able to use different sliders on every page. I’m trying to get the slider only to display on the home page. I can use the customizr slider for the other pages. I’ve researched and found the following codes:

    // Add some text after the header
    add_action( ‘__after_header’ , ‘add_promotional_text’ );
    function add_promotional_text() {

    // If we’re not on the home page, do nothing
    if ( !is_front_page() )
    return;

    // Echo the html
    echo “<div>Special offer! June only: Free chocolate for everyone!</div>”;
    }

    OR:

    <?php if ( is_home() ) { ?>

    <div class=”headerslider”> <?php echo do_shortcode(‘[rev_slider slider2]’); ?></div>

    <?php } ?>

    I haven’t been able to get anything to work. I’m knee-deep in design at the following site: https://new.connectionsvolunteercenter.org/wp/ Please excuse the mess.

    Please advise.

    Thank you!!!!!

Viewing 10 replies - 1 through 10 (of 10 total)
  • Use this:

    add_action( '__after_header' , 'rev_slider' );
    function rev_slider(){
      if ( ! tc__f('__is_home') )
        return;
    ?>
      <div class="headerslider"> <?php echo do_shortcode('[rev_slider slider2]'); ?></div>
    <?php
    }

    Anyway as pro user, for any issue with Customizr-Pro you can open a new topic here -> https://themesandco.com/support-forums/forum/customizr-pro/

    Hope this helps.

    Thread Starter ckndancemama

    (@ckndancemama)

    Sorry I posted in the wrong place ??

    I copy/pasted code into my header.php file and it didn’t work. Any suggestions? Does it need to go into the functions.php file or header or the widget itself? I can put the slider into the content of the homepage to fix it but then I have a white pad between slider and header and I want it to be flush against each other.

    Any thoughts are appreciated! Thank you for your answer!

    Yes you should put it in your child-theme functions.php ??

    Thread Starter ckndancemama

    (@ckndancemama)

    I’m sorry to be so hard headed. Ok – I put the code in the functions.php page and it didn’t break Yay! but it still doesn’t have the slider only on homepage. I have my shortcode currently in the extra header widget. Should it go in the content section of the homepage? Is the shortcode placement what I’m struggling with?

    Thread Starter ckndancemama

    (@ckndancemama)

    I spoke too soon! You ROCK!!!!! I pulled the shortcode out of the widget and it works beautifully! Thank you so much!!!!

    Thread Starter ckndancemama

    (@ckndancemama)

    Thank you d4z_c0nf!

    You’re welcome and glad you solved ! ??

    So the function “tc__f(‘__is_home’)” returns true if current page is the home page. I would like to have Revolution Slider on other pages as well. For instance, I have a contact page with pageid=114. How can I determine in PHP when the current page is 114?

    Anyone???

    curtds

    (@curtds)

    I have not the Pro version yet, but I would like to, but I want to make sure I can a few things first, three in all:

    1. I want to place a Slider Revolution in the Front Page Slider Option area, above the Feature Options and I have not be able to do that, I can only place the Slider Revolution below the Feature Options.

    I am not a coder or developer so if I need to use CSS I need absolute directions of where to do this at and how.

    2. Can I add more Feature Options?

    3. I would like to add a Testimonies section for my readers to be able to post their own testimony about God. I am assuming I could use one of the Feature Options? But is there something else also? Thank you.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Customizr Revolution Slider on homepage only’ is closed to new replies.