Viewing 4 reply threads
  • Author
    Posts
    • #771
      moshemo
      Member

      Hi 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

    • #780
      Steve
      Keymaster

      @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’
      `

    • #781
      moshemo
      Member

      Hi 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

    • #785
      Steve
      Keymaster

      It’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.

       

       

       

    • #789
      moshemo
      Member

      Thanks – 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

Viewing 4 reply threads
  • You must be logged in to reply to this topic.