- This topic has 4 replies, 2 voices, and was last updated 8 years, 9 months ago by
moshemo.
-
AuthorPosts
-
-
April 23, 2013 at 12:10 pm #771
moshemoMemberHi there,
I am using the LayerSlider and want to integrate it into a metabox on pages. Right now I’m using a text field and cutting and pasting the shortcode into the text field. That works fine so long as I remove the quotation marks from their short code. I.e.,
[layerslider id=1]
instead of
[layerslider id=”1″]
If I use the textarea option then there is no problems with the quotation marks.
So, my first question is whether or not there is a way to stop the quotation marks from being stripped out when using the regular text field.
My next question is whether or not its possible to populate a drop down menu with all of the various sliders that I have created so that I don’t need to copy and paste the short codes. If so, any idea how I would go about doing this.
Thanks and be well,
Moshe
-
April 23, 2013 at 4:03 pm #780
SteveKeymaster@moshemo– You can include anything you want in a dropdown. Use the standard dropdown code here, and change the options to your shortcode code.
`
‘[layerslider id=”1″]’ => ‘LayerSlider 1’
` -
April 23, 2013 at 4:05 pm #781
moshemoMemberHi there,
The thing is, I want this to happen dynamically – that is to say, whenever I create a new Layer Slider I want the drop down menu to automatically update (layerSlider 1, LayerSlider 2, LayerSlider 3, etc.).
Is that possible?
Thanks and be well,
Moshe
-
April 23, 2013 at 4:47 pm #785
SteveKeymasterIt’s a little bit of work, but you can definitely do it. Here are a few examples of how to dynamically populate Piklist fields:
Notice they all use standard WordPress functions to grab the appropriate data, and then Piklist displays them.
This post explains how to list all available shortcodes in WordPress. You will have to grab all the shortcodes, filter for the ones you want and then place them into a Piklist field.
-
April 23, 2013 at 6:06 pm #789
moshemoMemberThanks – that’s what I was looking for :).
I’ll take a closer look at that tomorrow and see if I can implement it.
Be well,
Moshe
-
-
AuthorPosts
- You must be logged in to reply to this topic.