Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1383053
    skyhawkmedia
    Participant

    Hi,

    I have a revolution slider which I place above the masthead on normal pages. So I want anyone who visits the page for a media item (i.e. a picture) to also see the same kind of view (with my slider above the masthead). Is this possible?

    I currently have a child theme and I have tried a number of different ways to get the slider on there. My latest attempt was to clone the wp-single.php file and use putRevSlider(“slider”) in there. This simply resulted in me getting a “Record not found” error message in place of the slider.

    Any ideas gratefully welcomed.
    Thanks
    Steve

    #1383230
    Jade
    Moderator

    Hi Steve,

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    #1384181
    skyhawkmedia
    Participant
    This reply has been marked as private.
    #1384827
    Rue Nel
    Moderator

    Hello Steve,

    Thanks for updating in! Since the child theme is set up, please add the following code in your child theme’s functions.php file

    // Add custom slider in the attachment page
    // =============================================================================
    function custom_attachment_slider() { ?>
      <?php if ( is_attachment() ) : ?>
        <div class="custom-slider">
          <?php echo do_shortcode('[rev_slider alias="main-header"]'); ?>
        </div>
      <?php endif; ?>
    <?php }
    add_action('x_after_view_global__slider-below', 'custom_attachment_slider');
    // =============================================================================

    Please let us know if this works out for you.

    #1385268
    skyhawkmedia
    Participant

    Oooh that’s sneaky 🙂 …I see what you did. Great idea, thanks, and worked a treat.

    Just one further question, is that add_action line for a slider below the masthead? My other pages are above the masthead. I know the masthead is invisible so the whole thing is moot, but just for my information. If so presumably I would just replace the word “below” with “above”?

    Thanks for the help
    Steve

    #1385272
    Nabeel A
    Moderator

    Hi again,

    Yes it is for slider below the masthead, replacing the the word “below” with “above” should work for slider above the masthead.

    Let us know how this goes!

    #1385275
    skyhawkmedia
    Participant

    Yep…changed…worked!
    Brilliant! Thank you so much guys.

    #1385290
    Thai
    Moderator

    If you need anything else please let us know.

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