-
AuthorPosts
-
June 6, 2019 at 2:34 pm #1107943
As of LayerSlider documentation, that you can find here,
it should be possible to hook to some actions to add custom html. In particularlayerslider_before_slider_content
andlayerslider_after_slider_content
, but it’s not working.Echoing my custom div using the action
layerslider_after_slider_content
the div appears before the slider and not after.
So I checked in your fileenfold/config-layerslider/LayerSlider/includes/slider_markup_html.php
and I discovered that the whole slider output is put into an array varaible ($lsMarkup) and it’s printed later, in another file. That’s why it goes before the actual slider.So, to make it work, instead of echoing my div in my function, I appended it to the array varialble, that obviously it’s not available in my function, meaning that I had to edit your file and add global $lsMarkup; around the top of slider_markup_html.php file.
Now it’s working fine, but do you think it’s useful to fix this thing in my way to allow those actions to work properly?
Thanks
Andrea
June 8, 2019 at 3:59 pm #1108449Hey f.giorgini,
Sorry for the late reply, glad to hear you were able to create a solution, but can you link to a copy of your layerslider_after_slider_content function so we can try to recreate the issue?Best regards,
MikeJune 10, 2019 at 5:55 pm #1108853Hi Mike and thanks for your reply.
You can actually try it by printing whatever comes in your mind and then check via Chrome Dev Tools, where the new div was inserted.
This is an example:add_action( 'layerslider_after_slider_content', 'add_div_after_slider' ); function add_div_after_slider() { echo '<div id="my-new-div">Blah blah</div>'; }
You will see that it’s added before and not after the slider code, for the reason I explained in my previous post.
June 13, 2019 at 5:49 am #1109702Hi,
Sorry for the late reply, and thanks for the example code. I was able to reproduce so I wrote a report for the dev team to review your solution.
Thanks for sharing.
I will post here as I learn more.Best regards,
MikeJune 13, 2019 at 12:58 pm #1109853Hi!
The file enfold\config-layerslider\LayerSlider\includes\slider_markup_html.php containing this hook is part of layerslider plugin – there is not much we can do.
I will ask if we can forward this to layerslider devs. Maybe you can also try to place a report about that there?
Best regards,
GünterMarch 25, 2020 at 9:28 pm #1197864I am having trouble trying to remove a video that is linked to my header. Can you please explain where I can get in to remove it? I don’t know if an update has prevented me from getting to it.
March 26, 2020 at 7:14 am #1197953Hi Racergirlmel,
I’ve replied to your other thread already, let’s continue in there.
Best regards,
RikardDecember 1, 2020 at 11:39 pm #1264343Hi, I just chatted with my provider (one.com) to find the reason for an error message including the layerslider (see below).
When I changed the theme, the error message was gone and appeared again after reinstalling enfold and updating wordpress. The support assumed, that “it is possible that it does not work properly on updated wordpress site. So the theme developers needs to publish an update to fix the error.”
Can you help?
Warning: Creating default object from empty value in /customers/f/1/6/music-step-by-step.com/httpd.www/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/slideshow_layerslider/slideshow_layerslider.php on line 28 Warning: Cannot modify header information – headers already sent by (output started at /customers/f/1/6/music-step-by-step.com/httpd.www/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/slideshow_layerslider/slideshow_layerslider.php:28) in /customers/f/1/6/music-step-by-step.com/httpd.www/wp-includes/functions.php on line 6274 Warning: Cannot modify header information – headers already sent by (output started at /customers/f/1/6/music-step-by-step.com/httpd.www/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/slideshow_layerslider/slideshow_layerslider.php:28) in /customers/f/1/6/music-step-by-step.com/httpd.www/wp-admin/includes/misc.php on line 1310December 3, 2020 at 5:04 am #1264635Hi stephanbecker2017,
Please open a new thread and include WordPress admin login details in private so that we can have a closer look at your site.
Best regards,
Rikard -
AuthorPosts
- You must be logged in to reply to this topic.