Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1396590

    Hi,
    Is there a way to place a full width slider image (or static image) between the logo and the horizontal navigation bar? Right now we have logo, navbar, full width slider, then content but our client wants logo, the image, then nav bar, then content. This image needs to be full width, but we don’t need to use the slider. They have no plans for a slideshow. It’s a very boring site, but this is what they want.

    We are comfortable with functions.php, or header.php in the child theme, if you could provide guidance. Please see private content for the website link, if that helps. I appreciate your advice. Thanks.

    #1396613

    Hey GWS,
    Is this image going to be for every page or just the homepage?
    Assuming it is just for the homepage I would recommend moving the current slider with jQuery so in the future you can easily change the image in the current slider and not change the script.
    Try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:

    function move_slider_before_menu() { ?>
      <script>
    window.addEventListener('DOMContentLoaded', function() {
    (function($) {
         $('#top.home #full_slider_1').detach().insertBefore('#header_main_alternate');
    })(jQuery);
    });
    </script>
      <?php
    }
    add_action('wp_footer', 'move_slider_before_menu');

    Best regards,
    Mike

    #1396877

    Thank you for the script. It works beautifully, but they prefer having the navigation slider above it throughout the entire site. How would we go about setting it that way?

    It would be nice to be able to change the image from the dashboard, but if that is not possible it is ok. The priority is the image above the navigation.

    #1396886

    Hi,
    Thanks for the feedback, unfortunately, the site is now in maintenance so I can’t see it right now.
    Please include and admin login.
    As I understand this script for the homepage works correctly, but you want the same thing for all pages and I assume that the same slider is not currently on all pages.
    If so one option is to create a script that adds the slider shortcode into all pages and remove the slider from the homepage, which I can do.
    But the drawback with this approach is in the future once you hand the site over to your client they may find it hard to change the slider/image and if they decide to have different images or sliders for certain pages.
    I would recommend adding the same slider element to the top of each page as it was on the homepage and then remove the .home from the script above so it works on every page, then in the future the client can easily change the image on a per page basis if they wish.
    Just a thought :)

    Best regards,
    Mike

    #1396898

    Thanks, Mike! This is exactly what I was looking. As always, Enfold has great support and we love the theme.

    #1396902

    Hi,
    Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Place full width slider image between logo and horizontal nav bar’ is closed to new replies.