- This topic has 5 replies, 2 voices, and was last updated 1 year, 3 months ago by
Steve.
-
AuthorPosts
-
-
October 14, 2020 at 2:41 pm #10997
thorMemberI stumbled upon a tutorial in the docs:
https://piklist.github.io/docs/tutorials/shortcodes/save-shortcode-data-to-database/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
SteveKeymaster@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
meta_id.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://piklist.github.io/docs/tutorials/shortcodes/save-shortcode-data-to-database/
-
October 15, 2020 at 2:44 am #11000
thorMemberThank 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
SteveKeymasterCan you post here what you are seeing?
-
October 15, 2020 at 1:23 pm #11003
thorMemberIf 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
[test my_shortcode="This%20is%20a%20test"]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:
[test my_shortcode="1%2C2%2C3%2C4"] -
October 15, 2020 at 3:30 pm #11004
SteveKeymasterAh… Sorry, Piklist does not have a filter for that.
-
-
AuthorPosts
- The topic ‘Tutorial not working’ is closed to new replies.