October 14, 2020 at 2:41 pm #10997
I stumbled upon a tutorial in the docs:
It is missing a ‘)’ in the end of the first piece of code. By the way, is it suppose to show the fields data_id as value in the shortcode, or is
my_shortcode_saved_to_db=""the right appearance?
October 14, 2020 at 4:15 pm #10998
@thor– since your saving the shortcode data to the database, Piklist needs a way to pull it. You can use that shortcode multiple times in one post so the only unique ID to use is
Let us know how this works for you. It’s one of the coolest features of Piklist.
I updated the docs page as well: https://docs.piklist.com/tutorials/shortcodes/save-shortcode-data-to-database/
October 15, 2020 at 2:44 am #11000
Thank you Steve. I understand how it works now 🙂
Is there a way (filter?) to prevent the urlencoding of the shortcode fields/parameters that Piklist returns to the editor?
October 15, 2020 at 12:57 pm #11001
Can you post here what you are seeing?
October 15, 2020 at 1:23 pm #11003
If I have this:
<?php /* Name: Test Description: Testing Shortcode: test Icon: dashicons-editor-quote */ piklist('field', array( 'type' => 'text' ,'field' => 'my_shortcode' ,'label' => 'Demo shortcode' ));
and enter “This is a test” in the field, it encodes and outputs the shortcode to
I understand that this is safer in many cases, but it makes the shortcodes almost unreadable in some cases – and not easily editable – e.g. if it’s an URL as attribute or comma separated values like 1,2,3,4:
October 15, 2020 at 3:30 pm #11004
Ah… Sorry, Piklist does not have a filter for that.
- You must be logged in to reply to this topic.