Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #994527
    Amanda P
    Participant

    Hello,

    I have a child theme set up and I have done a few custom codes in the functions.php and header views. Now I am wanting to add in a revolution slider below the header, but above the post feed on the blog page only.

    I want to put <?php putRevSlider( 'blogslider' ); ?> but I have been unsuccessful in finding which exact file I should add the code to. If you have any suggestions or solutions, that would be great.

    Thank you

    #994917
    Nabeel A
    Moderator

    Hi Amanda,

    Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    #996111
    Amanda P
    Participant
    This reply has been marked as private.
    #996644
    Darshana
    Moderator

    Hi there,

    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 update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    Then add the following code into your child theme’s functions.php file and then replace agency-home with your slider alias which you can locate under slider settings.

    
    function my_custom_slider() { 
    	if ( is_home() ) {
    ?>
    
    <!-- Begin My Custom Slider -->
    <div class="x-container max width">
        <?php echo do_shortcode('[rev_slider alias="agency-home"]'); ?>
    </div>
    <!-- End My Custom Slider -->
    
    <?php 
    	}
    }
    
    add_action( 'x_after_site_begin', 'my_custom_slider' );
    

    Hope that helps.

    #996835
    Amanda P
    Participant

    Hello!

    Thank you, that did, indeed insert the slider into the blog page, but it put it above the header instead of only above the blog feed.

    Is there a way to insert the slider below the header, but before the blog post feed? This is what I’m looking for…. but now that I have this piece of code, I might even figure it out on my own 😀

    #996853
    Christopher
    Moderator

    Hi there,

    Please update your code to :

    function my_custom_slider() { 
      if ( is_home() ) {
    ?>
    
    <!-- Begin My Custom Slider -->
    <div class="x-container max width">
        <?php echo do_shortcode('[rev_slider alias="agency-home"]'); ?>
    </div>
    <!-- End My Custom Slider -->
    
    <?php 
      }
    }
    
    add_action( 'x_before_view_integrity__landmark-header', 'my_custom_slider' );

    Hope it helps.

    #997654
    Amanda P
    Participant

    Awesome, thanks! Is it possible to make the sidebar come up beside the slider? Or am I asking too much 🙂

    #997669
    Amanda P
    Participant

    I’m trying to replicate something similar to this: http://velikorodnov.com/wordpress/revija/home2/

    #997896
    Darshana
    Moderator

    Hi there,

    Please check their slider examples to see if there is any similar effect that you like (https://revolution.themepunch.com/free-slider-exchange/) and then you can import it to your site.

    Thanks!

  • <script> jQuery(function($){ $("#no-reply-994527 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>