Okay
  Public Ticket #2031984
Dynamic Content
Closed

Comments

  • carolynrose4 started the conversation

    Hi there,

    I'm using LayerSlider on one of my sites and it is working great.

    I have this other site I am working on that wants a complex slider. I've been playing around with this slider to see if it will be able to do what they want. I have some questions for you as to some functionality with the Dynamic loaded content.

    1. In my tests, the "Configure Post Options" globally effects all slides. I need it to set the post options to be different on each slide. Is this possible?

    2. I've been trying to use the [meta:fieldname] codes for my custom post fields. Text fields work just fine, but I can't get custom image fields or embedded video codes to show up. Do you have any further documentation on different types of custom fields? I've read through this, but there was no information that I could find to help me: https://layerslider.kreaturamedia.com/developers/#dynamic-layers

    Looking forward to your reply!

  • [deleted] replied

    Hello Carolynrose4,

    Thank you for getting in touch with us. My name is Attila and I'm happy to assist you today. I appreciate your patience while we've been working towards your ticket.

    Yes, that is right. The filters applied in the Configure post options tab are global, and you can use one post per slide.

    How exactly did you use the meta placeholders ? It should be working normally.

  • carolynrose4 replied

    Hi Attila,

    Thank you for the quick reply.

    1. So there's no way for Slide #1 to pull a random post from category #1 and Slide #2 to pull a random post from category #2 (and so on)? 

    2. As for the meta: using [meta:fieldname] works well for text, but I have a custom field that is an image. In the custom field options, i can set the return value to Image Array, Image URL, or Image ID. None of these successfully loads the image within the slider when i use [meta:custom_image]. I also could not get a video to work in this same fashion.

    If the WP plugin is unable to do the above, would the LayerSlider JS be able to accomplish my needs better?

    Thanks,

    Carolyn

  • [deleted] replied

    To do that you will need to select all categories globally for all slides. That way you can choose from each on all slides.

    The [meta:fieldname] can only pull text content, but you can load images too with custom HTML code. You will need to create an HTML layer and insert the proper code. For example images: <img src="[meta:image_url]">


  • carolynrose4 replied

    Hi Attila,

    Your answer confuses me. If I select all the categories in the global settings, how do I choose which category slide #1 will pull from and which category slide #2 will pull from? I don't see that option.


    As for wrapping the shortcode in HTML, I have tried it as a Dynamic layer and as an HTML layer. 

    This is my code: <img src="[meta:bg_image]" > and that custom field is set to give a URL.

    On the Dynamic layer, it just outputs the url for the page the slider appears on, not the image's url. And on the HTML layer it outputs this:

    website.com/sample-page/%5Bmeta:bg_image%5D

  • [deleted] replied

    As mentioned, you cannot set separate categories per individual slides. That is why you will need to globally select all categories (ctrl/shift + click) that you want to use, so you can choose from all of them on all slides. This is not ideal, but you can work around it this way.

  • carolynrose4 replied

    Hmm, that won't work for my situation as each category of posts has different custom fields. Do you think the JavaScript version of LayerSlider would be able to handle this? Thank you for your help! 

  • [deleted] replied

    If you meant the jQuery version of the plugin, then it's working the same way. The two items are basically identical with the same methods and functions, the only difference is the slider builder interface for the WP release. So unfortunately you would face the same restrictions.

  • carolynrose4 replied

    Hmm, Would I be able to code a WP query loop inside each individual slide that targets different categories? I have been successful in doing this with another slider javascript. 

  • [deleted] replied

    Thank you for the feedback. I'll contact with the dev team regarding this case to see whether it's possible and get back to you shortly.

  • [deleted] replied

    Thank you for your patience. 

    Unfortunately we do not offer any API function for this at the moment. This means that you would need to edit the plugin files directly, as you can't control this externally. It would require advanced web development knowledge and you would need to remake these changes on each plugin update. So we wouldn't recommend it.

    We are planning to improve dynamic content handling in the future and also include methods such as the ones you're looking for.