Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1308918
    iTurtle
    Participant

    hi there,

    i realise there are many similar requests in the forum. but none so far did work for me. maybe also i have not enough php knowledge to make it possible. also i use the icon stack and most posts refer to different stacks with the same question.

    is there any way for a not so experienced user to get this done? a rev-slider in the header of the blog page (which is – in my case – the start page of the website).

    or maybe maybe 😉 will this be a feature of the elusive version 5 of x? hope hope 🙂

    thanks a lot and best wishes, kai

    #1308994
    Rahul
    Moderator

    Hi Kai,

    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.

    Thank you in advance

    #1309098
    iTurtle
    Participant
    This reply has been marked as private.
    #1309557
    Rue Nel
    Moderator

    Hello There,

    Thanks for providing the information. What you are trying to accomplish requires a template customization, we would like to suggest that you use 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.

    After the child theme is set up, please add the following code in your child theme’s functions.php file

    // Displaying custom slider on main blog index and single blog posts
    // =============================================================================
    function add_custom_slider(){ ?>
    
      <?php if ( is_home() || is_single() ) : ?>
      
    	  <div class="custom-slider">
    	    <?php putRevSlider( 'my-slider-slug' ); ?>
    	  </div>
    
      <?php endif; ?>
    
    <?php }
    add_action('x_before_view_global__slider-above', 'add_custom_slider');
    // =============================================================================

    The code above will display a custom slider in your blog and single blog posts. Just do not forget to insert the correct slider-slug.

    We would loved to know if this has work for you. Thank you.

    #1309720
    iTurtle
    Participant

    heureka!!! thanks so much! that was pretty easy, too.
    some threads in the forum sounded much more complicated to me.
    now only the topbar is below the slider. can the slider be under the topbar like on the other pages, too?
    thanks a million! kai

    #1309736
    Paul R
    Moderator

    Hi Kai,

    Please change the code to this.

    
    // Displaying custom slider on main blog index and single blog posts
    // =============================================================================
    function add_custom_slider(){ ?>
    
      <?php if ( is_home() || is_single() ) : ?>
      
          <div class="custom-slider">
              <?php putRevSlider( 'my-slider-slug' ); ?>
          </div>
    
      <?php endif; ?>
    
    <?php }
    add_action('x_after_view_global__topbar', 'add_custom_slider');
    // =============================================================================
    

    Thanks

    #1309742
    iTurtle
    Participant
    This reply has been marked as private.
    #1309743
    iTurtle
    Participant

    perfect paul! you are the best! very happy with your support!

    #1309793
    Rue Nel
    Moderator

    Hello There,

    You’re welcome! We’re happy to help you out.
    If you need anything else we can help you with, don’t hesitate to open another thread.

    Cheers to a New Year coming up! Have an enjoyable one!

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