-
AuthorPosts
-
May 26, 2017 at 5:32 pm #800276
Hello!
Big fan of Enfold, but having trouble with formatting the LayerSlider I’ve created when viewing the site with left sidebar menu and logo on the home page. You can see, it gets cut off. What do I adjust to make slider responsive to the new width of the main content area. Thanks!
May 26, 2017 at 9:17 pm #800379Hey rdtjosh,
Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look.
Best regards,
VictoriaMay 26, 2017 at 9:42 pm #800398May 27, 2017 at 1:08 pm #800526Hi rdtjosh,
Layer Slider width calculations don’t know that you have a menu on the side, so they kind of think the have those 300px. Let’s try to adjust the controls.
Here is the code you can put in your funtions.phpadd_action('wp_footer', 'avia_adjust_ls_width_script'); function avia_adjust_ls_width_script(){ ?> <script type="text/javascript"> (function($) { jQuery(window).on("load", function(e) { jQuery("#layerslider_1").css("width", window.innerWidth-300); }); jQuery(window).on("resize", function(e) { jQuery("#layerslider_1").css("width", window.innerWidth-300); }); })(jQuery); </script> <?php }
If you need further assistance please let us know.
Best regards,
VictoriaMay 27, 2017 at 11:26 pm #800658Victoria, I appreciate the help but for some reason, when I paste this code at the end of functions.php, I get an error… Am I pasting this in the right place? (Sorry, not a coder ;)
May 28, 2017 at 5:39 am #800711Hi,
May you send to us a screenshot of the error that you`re getting?
Best regards,
John TorvikMay 28, 2017 at 9:49 pm #800897Hmm, I tried pasting the code again today and it is not showing the error. However, the code does not seem to be affecting the slider appearance. Can you log in and take a look?
May 31, 2017 at 4:36 am #801770Hi,
We modified the code in the functions.php file.
// layer slider width fix function ava_custom_script_mod(){ ?> <script> (function($){ $.fn.layer_slider_width_helper = function(options) { return this.each(function() { var container = $(this), main = $('#main').innerWidth(), first_div = container.find('.ls-wp-container'), timeout = false, counter = 0, reset_size = function() { if(first_div.innerWidth() > main || counter > 5) { first_div.width(main); } else { timeout = setTimeout(reset_size, 1000); counter++; } }; console.log('ls-resize'); if(!first_div.length) return; timeout = setTimeout(reset_size, 0); }); } $(window).on('load resize', function() { $('.avia-layerslider').layer_slider_width_helper(); }); })(jQuery); </script> <?php } add_action('wp_footer', 'ava_custom_script_mod');
Best regards,
IsmaelJune 7, 2017 at 12:10 am #804751Thanks for trying to help. I did not like how the slider was behaving so I decided to revert back to the menu placement on top, rather than side menu. I would like the slider to behave the way it did originally. It still resizes oddly when the browser is maximized or stretched fully horizontally- the layered objects are off to the left. I removed the custom code from the functions.php file, but it is still not reverting. Please help… thank you.
June 7, 2017 at 12:18 am #804753I have linked a screenshot of how the slide is designed in LayerSlider to compare to the current site home page- you can see that the layers are not arranged the same way…
June 7, 2017 at 4:19 am #804810Hi,
It looks quite alright in my end. Please check the screenshot of the frontend.
Best regards,
IsmaelJune 8, 2017 at 8:11 pm #805727Please see this screenshot: http://imgur.com/a/2CAcS
The navigation buttons are off to the right- the right arrow is not even visible. I believe this is an issue of the viewing area not being the same as the slide template I designed?
June 12, 2017 at 7:35 pm #807034Hi rdtjosh,
You should really consider updating your php to php7. Layer Slider and other plugins rely on that.
Best regards,
VictoriaJune 12, 2017 at 7:42 pm #807039Hi,
Also this might help
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.