Forum Replies Created
-
AuthorPosts
-
November 30, 2018 at 12:41 pm in reply to: Creating a Settings page, doesn't work/strange behaviour #9239
SteveKeymaster@mrsdrjim– Thank you for using Piklist and welcome to our community!
You don’t need to add code to the Piklist plugin itself. The original way you were doing it sounds right.
Make sure you include
Plugin Type: Piklistin the header of your main plugin file as specified here:
https://piklist.github.io/docs/getting-started/writing-a-plugin-for-piklist/That tells Piklist to go scan the plugins folders for files.
Let us know if that works.
SteveKeymaster@rikdegraaf– This is currently not something that Piklist does. You would probably have to write some custom JS / AJAX to get this working.
HOWEVER…
I’ve done something like this with Piklist Workflow tabs. In Tab 1 the user selects the Post, and then in Tab 2 you can populate the data. The reason you can do that is because the data is saved in Tab 1, and then the page reloads for Tab 2.
Hope that helps.
SteveKeymasterWe are still working on a version of Piklist that will be compatible with Gutenberg.
SteveKeymasterCreate all your fields in one /parts/ file in Piklist, like this:
https://github.com/piklist/piklist/blob/develop/add-ons/piklist-demos/parts/terms/field-select.phpAdd the
newparameter to the comment block:
https://piklist.github.io/docs/comment-block-parameters/#newThat’s it!
SteveKeymasterIt should.
Let us know if you see any issues.
SteveKeymasterYou would have to use
piklist_part_processto identify the area (e.g. metabox, term, setting, etc) you want to render.Wrap that logic around a piklist field call: https://github.com/piklist/piklist/blob/develop/add-ons/piklist-demos/parts/meta-boxes/field-text.php#L19-L28
You can use
piklist('field')in your functions.php file and it will render.
SteveKeymasterYou are correct.
piklist_part_processis the best way to handle this.
SteveKeymasterThis reply has been marked as private.
SteveKeymasterIt’s pretty simple to use “Select2” with Piklist. Here’s a tutorial:
https://piklist.github.io/docs/tutorials/fields/using-select2/You can also use “Chosen” instead:
https://piklist.github.io/docs/tutorials/fields/using-chosen/
SteveKeymasterPull request has been merged: https://github.com/piklist/piklist/pull/113
SteveKeymasterCan you give us an example? A screenshot would help.
SteveKeymasterAlex– You can filter the comment block any Piklist
partby using thepiklist_part_process_callbackfilter.This tutorial uses this filter to add the user role “no-role” is certain conditions apply. You can do the same with Workflow tab.
https://piklist.github.io/docs/tutorials/meta-boxes/hide-meta-boxes-page-template/
SteveKeymaster@toni– This is certainly all possible with WordPress and Piklist. It’s probably not a small task, but doable.
SteveKeymasterthe_content()is a WordPress function that OUTPUTS data. Piklist doesn’t have custom functions to output data. We let you use normal WordPress functions likeget_post_meta().
SteveKeymasterWordPress adds this filter for you when you use
the_content():
https://core.trac.wordpress.org/browser/tags/4.9/src/wp-includes/post-template.php#L240 -
AuthorPosts