Tagged: LayerSlider
-
AuthorPosts
-
March 27, 2014 at 2:15 pm #243831
Hello,
First of all some credits for the great theme!
Then now my question/problem. I want to show a full-width LayerSlider on every single post page (it’s one slider, so no need to configure it per page).
What i’ve done so far:
– I use a child theme
– Created my own single.php
– added the following code:<?php echo do_shortcode(‘[av_layerslider id=”slider_blog”]’); ?>
This results in the following two errors:
Undefined index: index in /wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/slideshow_layerslider.php on line 118 and 121.
—
I managed to get it working by a very strange work-around, wich is not usable for the people who are going to use this website.
If i place [av_layerslider id=”slider_blog”] manually in the content of the blog post, save it, remove the shortcode from the content. Then the layer slider is working, because the post meta ‘_avia_builder_shortcode_tree’ is generated with some slider information.
—
Could you help me achieve what i’m looking for?
Thanks in advance.
Robbert
- This topic was modified 10 years, 8 months ago by adiuvoNL. Reason: Typo
March 30, 2014 at 11:08 am #245043Hey adiuvoNL!
I’m not sure if “slider_blog” is a valid id. Did you try to use a numeric id instead?
http://www.clipular.com/c/5816379106131968.png?k=NqfyH6VsUGBnwQt3-Bvn44XE4zcCheers!
PeterApril 1, 2014 at 8:42 am #245877Hi Peter,
Yes i’m sure :-)
I tried to debug the given error, and it looks like enfold is missing the $meta data used in the av_layerslider shortcode to determine how to generate the needed html code for displaying the slider. As mentioned in my first post, after adding/removing a layerslider shortcode in the text editor is works. Because of the _avia_builder_shortcode_tree being generated in de database.
An alternative would be to directly use native LayerSlider code, but the shortcode [layerslider] or <?php layerslider(‘id’) ?> do not work.
Thanks.
Robbert
April 2, 2014 at 9:07 am #246408Hi!
If you want to use the [layerslider] shortcode you must activate the slider as a plugin. Copy the wp-content/themes/enfold/config-layerslider/LayerSlider/ folder to wp-content/plugins and then deactivate Enfold. Afterwards activate the LayerSlider plugin and then re-activate Enfold.
Best regards,
PeterApril 2, 2014 at 9:13 am #246413Hi Peter,
Thanks.
I’m using a child theme, so i need to deactivate the Child theme instead of Enfold i guess?
Regards,
Robbert
April 5, 2014 at 12:01 am #247686Yes, exactly, switch to the default WP theme before activating LS.
Best regards,
JosueApril 7, 2014 at 7:34 pm #248403One last question.
After i change this, is it still possible to use the layerslider snippet in the template builder in pages?
Thanks.
April 8, 2014 at 2:36 am #248575Hey!
You have been able to do that without the change:
Regards,
Josue -
AuthorPosts
- You must be logged in to reply to this topic.