I have been trying to add a necter slider to the main shop page, I know I could use short codes but I cannot find one to show the sort and other options. So I went the route of editing the woocommerce.pgp file within the salient directory. I have added this code to the page (within Php tags):
Which works to the extent that the html is added to the page for the slider however remaiins hidden as has attribute display:none; I assumed that it was due to the lack of the required javascript and comparing the head section of the shop and another page with the slide showed that I was correct the nectar-slider.js file isn't present.Any idea how I can get this to work ?
I guess I could but then I am loading yet another load of JavaScript where as by just reusing the Nectar Slider the javascript will be cached on the visitors browser ! Just seems like a tidier solution, I just can't see anywhere where the Nectar slider is wp_dequeue_script, or similar on a woo commerce page.
If you need to enqueue the Nectar Slider on pages where it wouldn't normally open up the functions.php file and remove the wrapping conditional from this:
Hi,
I have been trying to add a necter slider to the main shop page, I know I could use short codes but I cannot find one to show the sort and other options. So I went the route of editing the woocommerce.pgp file within the salient directory. I have added this code to the page (within Php tags):
<code>echo do_shortcode('[nectar_slider location="Home" full_width="true" arrow_navigation="true" bullet_navigation="true" parallax="true" loop="true" slider_height="550" desktop_swipe="true" autorotate="5000"]');</code>
Which works to the extent that the html is added to the page for the slider however remaiins hidden as has attribute display:none; I assumed that it was due to the lack of the required javascript and comparing the head section of the shop and another page with the slide showed that I was correct the nectar-slider.js file isn't present.Any idea how I can get this to work ?
Thanks for your time, Tom
Hey Tom!
Why don't you use the Revolution Slider on there ?. You wont have the js missing issue with it.
Cheers
ThemeNectar Support Team
Hi Tahir,
I guess I could but then I am loading yet another load of JavaScript where as by just reusing the Nectar Slider the javascript will be cached on the visitors browser ! Just seems like a tidier solution, I just can't see anywhere where the Nectar slider is wp_dequeue_script, or similar on a woo commerce page.
Thanks for the suggestion,
Tom
Hey Tom!
If you need to enqueue the Nectar Slider on pages where it wouldn't normally open up the functions.php file and remove the wrapping conditional from this:
so that it becomes: Cheers :)