Forum Replies Created
-
AuthorPosts
-
SteveKeymaster@morganrt– Using echo with Piklist is fine. The framework takes care of the placement for you.
SteveKeymaster@johnvanham– We can look into this, but just a thought. Maybe insert some default text in the field. Something you would use instead of placeholder text.
SteveKeymaster@levipe– That’s really odd. And I wasn’t able to reproduce. Are you sure the one post in the grape cpt was “published”?
January 17, 2017 at 5:37 pm in reply to: Contact form inside metabox on any post page (in the admin)? #7730
SteveKeymaster@ssuess– I would create a metabox with all the fields you want:
-author email: gets pulled in automatically
-messageThen in your regular plugin file or themes functions.php try something like this:
function email_on_post_status($post_id) { global $post, $typenow; $post_status = get_post_status($post_id); //verify post is not a revision if (!wp_is_post_revision($post_id) && !wp_is_post_autosave($post_id)) { //use get_post_meta to get author email and message. Pass to wp_mail wp_mail($params); } } add_action('save_post', 'email_on_post_status', 1, 2); add_action('transition_post_status', 'email_on_post_status', 10, 3);
SteveKeymaster@utilityla– Welcome to the Piklist community!
are you removing the default editor with remove_post_type_support? Try enabling and let us know if that works.
SteveKeymaster@gabriel– Welcome to the Piklist community!
Can you post an example of your code here?
SteveKeymaster@friendlyfire3– you would enter the user login into that text field.
If you want to display a dropdown of users to choose from, this tutorial should help >
SteveKeymasterDecember 22, 2016 at 11:22 am in reply to: Add-more metabox – not displaying all values properly after removing a value #7690
SteveKeymaster@cyclissmo– Looks like you found a bug. I’ll add it to the list we’re working on, but I’m not sure it will get fixed quickly. We’re still fixing older bugs and writing unit tests.
SteveKeymaster@kcarwile– Welcome to the Piklist community!
Unfortunately, having two Workflows on the user pages can cause issues. Not really a way around it.
Wish I had better news.
SteveKeymasterPlease email fields to [email protected]
SteveKeymasterAssuming this is in wp-admin, and when creating/editing a post. Try this (untested):
piklist('field', array( 'type' => 'group' ,'scope' => 'user' ,'label' => 'User' ,'relate' => array( 'scope' => 'post' ) ,'fields' => array( array( 'type' => 'text' ,'label' => 'Login' ,'field' => 'user_login' ,'columns' => 6 ) ) )); // Display related users $related = get_users(array( 'order' => 'DESC' ,'user_belongs' => $post->ID ,'user_relate' => 'post' )); ?> <?php if ($related): ?> <h4><?php _e('Related Users', 'piklist-demo');?></h4> <ol> <?php foreach ($related as $related_user): ?> <li><?php _e($related_user->user_login); ?></li> <?php endforeach; ?> </ol> <?php endif; ?>December 22, 2016 at 11:09 am in reply to: Populate custom post type with data from external api #7686 -
AuthorPosts