Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1107943

    As of LayerSlider documentation, that you can find here,
    it should be possible to hook to some actions to add custom html. In particular layerslider_before_slider_content and layerslider_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 file enfold/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

    #1108449

    Hey 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,
    Mike

    #1108853

    Hi 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.

    #1109702

    Hi,
    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,
    Mike

    #1109853

    Hi!

    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ünter

    #1197864

    I 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.

    #1197953

    Hi Racergirlmel,

    I’ve replied to your other thread already, let’s continue in there.

    Best regards,
    Rikard

    #1264343

    Hi, 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 1310

    #1264635

    Hi 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

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.