Viewing 3 reply threads
  • Author
    Posts
    • #1093
      atomworks
      Member

      Hi guys,

      I set up a widget recently on a project that lists testimonial titles in a widget with checkboxes for each. When someone places the widget, they select testimonials and these are going to rotate at random in the front end of the site where the widget is displayed.

      The widget in the admin area function perfectly, it stores all the info needed. When it comes to outputting these values into the the template part however I’ve found that $settings only returns the first value and there isn’t a way with Piklist to get all those values as the widget() function in class-piklist-universal-widget.php (line 70) only returns the first.

      I’ve put a quick fix in place for now that basically creates a copy of $instance before it gets changed and then added that value to the render array to give me a $raw_settings variable to use. I’m sure there is a better way of doing this long term as it’ll be a powerful tool for more advanced widgets.

      I hope that made sense! Let me know if you want me to fill in any more details.

    • #1095
      Steve
      Keymaster

      @atomworks– which version of Piklist are you using?

    • #1096
      atomworks
      Member

      Hi Steve,

      I’m using the 0.8.0b5 build.

    • #1115
      Steve
      Keymaster
Viewing 3 reply threads
  • You must be logged in to reply to this topic.