-
AuthorPosts
-
January 20, 2016 at 6:32 pm #568806
Hi,
hope this question isn’t asked too often ;-)
And I also hope the answer is simple (I’m not so experienced in PHP)!Thanks!
January 20, 2016 at 7:11 pm #568823Hey!
Please go to Enfold/includes folder and edit loop-search.php file. You can add it using shortcode. Please see – https://developer.wordpress.org/reference/functions/do_shortcode/
Regards,
YigitJanuary 22, 2016 at 10:35 am #569885Hi Yigit,
sorry but I don’t get what I’ve to put in loop-search.php code…Thank you
January 22, 2016 at 4:08 pm #570169Hi!
When you create a slider you will get a shortcode which you need to add it in the loop-search.php page as explained in the above link
Best regards,
VinayJanuary 22, 2016 at 4:32 pm #570200I’m afraid this goes beyond me… = (
I did a try on loop-search.php file but:- I don’t get where to put it (which line, if I want the slider to be shown as the page header)
- Maybe I did not write it correctly, because I see nothing different
January 22, 2016 at 4:53 pm #570208Hey!
Where exactly would you like to add the slider? We can provide you more detailed instructions.
Regards,
YigitJanuary 22, 2016 at 5:17 pm #570222Look at the page in pvt content. I’d like to have the same slider in my search page.
Thank you!
January 27, 2016 at 7:54 am #572646Hi!
Unfortunately, adding the layer slider as shortcode is not going to work. You can append it on top of the search page but the slider will not initialized correctly. Example (functions.php file):
// add layer slider in search add_action('ava_after_main_title', 'add_layer_slider'); function add_layer_slider() { if( is_search() ) { echo do_shortcode("[av_layerslider id='1']"); } }
Please try to use this instead:
// add layer slider in search add_action('ava_after_main_title', 'add_layer_slider'); function add_layer_slider() { if( is_search() ) { $resources = "<link rel='stylesheet' id='layerslider-css' href='http://localhost/kriesi/enfold/wp-content/themes/enfold/config-layerslider/LayerSlider/static/css/layerslider.css?ver=5.6.2' type='text/css' media='all' /> <script type='text/javascript' src='http://localhost/kriesi/enfold/wp-content/themes/enfold/config-layerslider/LayerSlider/static/js/greensock.js?ver=1.11.8'></script> <script type='text/javascript' src='http://localhost/kriesi/enfold/wp-content/themes/enfold/config-layerslider/LayerSlider/static/js/layerslider.kreaturamedia.jquery.js?ver=5.6.2'></script> <script type='text/javascript' src='http://localhost/kriesi/enfold/wp-content/themes/enfold/config-layerslider/LayerSlider/static/js/layerslider.transitions.js?ver=5.6.2'></script>"; $script = "<script data-cfasync=\"false\" type=\"text/javascript\">var lsjQuery = jQuery;</script><script data-cfasync=\"false\" type=\"text/javascript\"> lsjQuery(document).ready(function() { if(typeof lsjQuery.fn.layerSlider == \"undefined\") { lsShowNotice('layerslider_7_1','jquery'); } else { lsjQuery(\"#layerslider_7_1\").layerSlider({responsiveUnder: 1140, layersContainer: 1140, autoStart: false, startInViewport: false, pauseOnHover: false, twoWaySlideshow: true, loops: 1, keybNav: false, touchNav: false, skin: 'fullwidth', globalBGColor: 'rgba(255, 255, 255, 0.45)', navPrevNext: false, hoverPrevNext: false, navStartStop: false, navButtons: false, showCircleTimer: false, thumbnailNavigation: 'disabled', lazyLoad: false, yourLogoStyle: 'left: 10px; top: 10px;', cbInit: function(element) { }, cbStart: function(data) { }, cbStop: function(data) { }, cbPause: function(data) { }, cbAnimStart: function(data) { }, cbAnimStop: function(data) { }, cbPrev: function(data) { }, cbNext: function(data) { }, skinsPath: 'http://www.saldaturacontrollo.it/wp/wp-content/themes/enfold/config-layerslider/LayerSlider/static/skins/'}) } }); </script>"; $output = $resources . '<div id="layer_slider_1" class="avia-layerslider main_color avia-shadow avia-builder-el-0 el_before_av_one_full avia-builder-el-first container_wrap sidebar_right" style="height: auto;"><div class="ls-wp-fullwidth-container" style="height: 121px;">'.$script.'<div class="ls-wp-fullwidth-helper" style="width: 918px; height: 121px; left: 0px;"><div id="layerslider_7_1" class="ls-wp-container ls-container ls-fullwidth" style="width: 918px; height: 120.789px; margin: 0px auto; visibility: visible;"><div class="ls-inner" style="width: 918px; height: 121px; background-color: rgba(255, 255, 255, 0.45098);"><div class="ls-slide ls-animating" data-ls=" transition2d: all;" style="width: 918px; height: 121px; visibility: visible; display: none; left: auto; right: 0px; top: 0px; bottom: auto;"><img src="http://www.saldaturacontrollo.it/wp/wp-content/uploads/2016/01/news3.jpg" class="ls-bg ls-preloaded" alt="news3" style="padding: 0px; border-width: 0px; width: 1610.53px; height: 120.789px; margin-left: -346.263px; margin-top: 0.105263px;"><div class="ls-gpuhack" style="width: auto; height: auto; padding: 0px; border-width: 0px; left: 0px; top: 0px;"></div><p class="ls-l" style="top: 56.3684px; left: -22.5474px; white-space: nowrap; width: auto; height: auto; font-size: 10.4684px; line-height: 11.2737px; padding: 0px; border-width: 0px; margin-left: 0px; margin-top: 0px; transform-origin: 50% 50% 0px; transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, -0.002, 0, 0, 0, 1); opacity: 1; visibility: visible;"><span class="slide-slogan2">I corsi in partenza e le nostre novità</span></p></div></div><div class="ls-loading-container" style="z-index: -1; display: none;"><div class="ls-loading-indicator"></div></div><div class="ls-shadow"></div></div></div></div></div>'; echo $output; } }
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.