Forum Replies Created
-
AuthorPosts
-
SteveKeymaster@ralmestro– If Piklist is a core part of your site, it would make sense that is uses more resources. I just ran it on a site using Piklist, BuddyPress and 23 other plugins activated. The results were pretty shocking 😉
Attachments:
You must be logged in to view attached files.
SteveKeymaster@wpkonsulterna– Just some clarification:
SteveKeymaster@wpkonsulterna– Yes, this can be done. Let me write up a tutorial. Will have it done by tomorrow.
SteveKeymaster@kattagami– There’s a bug in Piklist where it’s looking for the file plugin.php as the main plugin file. Change your main plugin name from test.php to plugin.php and it will work. We’ll fix in the next version.
SteveKeymaster@Angelos– Welcome to the Piklist Support Forums!
Currently, default values for our Add-Mores only work on the initial field. We have it on our list to make it work on every add_more.
Also, instead of using
"style" => "width:90%;", you may want to try the Piklist grid system. Everything lays out beautifully, and it’s also responsive.Your code would look like this:
piklist('field', array( 'type' => 'group' ,'field' => 'comment_div' ,'label' => __('Comments') ,'add_more' => true ,'fields' => array( array( 'type' => 'text' ,'field' => 'comment_author' ,'label' => __("From") ,'value' => $current_user->display_name ,'columns' => 12 ,'attributes' => array( "disabled" => true ) ) ,array( 'type' => 'text' ,'field' => 'comment_time' ,'label' => __("At") ,'value' => date('l jS F Y') ,'columns' => 12 ,'attributes' => array( "disabled" => true ) ) ,array( 'type' => 'textarea' ,'field' => 'support_ticket_comment' ,'label' => __("Comment text") ,'template' => 'field' ,'columns' => 12 ,'value' => '' ,'attributes' => array( 'class' => 'comment' ,'cols' => '80' ,'rows' => '3' ) ,'on_post_status' => array( 'value' => 'lock' ) ) ) ) );One more thing, I noticed you have the
on_post_statusparameter set. I doubt you want that. We placed it in the Demos to show off the functionality. Here is a tutorial on using on_post_status, which explains how it works.
SteveKeymaster@prasenjit– We don’t have a helper function for this. It would only be needed for our Add-More fields, anyway. Since Piklist does everything the WordPress way, what you’re doing here would work fine.
SteveKeymaster@prasenjit– Happy to help, but can you provide a little more detail? What exactly are you trying to do?
SteveKeymaster@kattagami– Just fixed WP.org… thanks for letting me know.
SteveKeymaster@kattagami– I’m guessing Piklist is not detecting the path correctly on this type of setup. Can you activate Demos and get them working?
SteveKeymaster@gary–
Just verifying… you’re using this tutorial, correct?
A few things:
1) This code goes in a file (any name you want), in the /meta-boxes/ folder. See this doc for the full path of this folder.
2) The file should also contain a comment block at the top. You can see how this looks here.
3) Replace,'field' => 'field_name'with,'field' => 'post_content'. Since you are replacing the default WordPress field, you need to use the WordPress field name which is post_content.Let me know if this works for you.
SteveKeymaster@jason– You were looking at a tutorial, the full docs are here> Conditions have a
relationparameter.
SteveKeymaster@kattagami– We’ve discussed this internally, and it’s on our feature list, but it’s currently not possible.
SteveKeymaster@seanster– In most cases Piklist does NOT save data as an array. The exceptions are add-more fields, and grouped fields with a field parameter defined.
For User Meta, you can just use the standard WordPress function get_user_meta().
I just checked wp-admin/user-edit.php and there are no actions to remove those items. You will have to do it with CSS.
SteveKeymaster@seanster– You can use any standard WordPress function to grab data from the db.
get_post_metaetc.
What sort of data do you want to retrieve?
-
AuthorPosts