Problem: I have a Form that edits posts, which includes a custom field. I would like to automatically set a taxonomy term on the post when the Form is submitted. The term should be determined by the value of the custom field.
Solution: Use the function wp_set_object_terms to set a term on a post:
Instead of term-slug you can use:
A single term slug, single term id, or array of either term slugs or ids. This will replace all existing related terms in this taxonomy. Passing an empty value will remove all related terms.
The last parameter false will delete all the other category terms from this post. If you use true instead of false, the existing category terms will not be deleted.
Problem:
The user would like to allow visitors to submit content and be able to add alt text and captions to images.
Solution:
When you "Allow Media Insert button in Post Content Rich Text Editor" when you create your Post Form, there will be a native WordPress Image upload screen where you can set those details just as used to in WordPress.
If you use a Types Image Custom Field, the uploader does not present those features and they would either need to be updated to the Attachment via a Custom PHP Script, using values coming from as example some "Single Line" Custom Types Fields, or, you would use the autogenerated values.
Both ways to upload images create a Post of type "attachment".
The different Meta-Data is stored as this:
Alt Text: uses the Post Meta Key _wp_attachment_image_alt
Caption: it's the actual Post Excerpt (Table column name post_excerpt)
Description: it's the actual Post Body (Table column name post_content)
Problem:
The user would like to have a confirmation message in the CRED delete links.
Solution:
You will need to use message_show='1' and then you can put your custom confirmation message in message argument and the success message in message_after.
[cred_delete_post_link text='Delete' message='Are you sure you want to delete this post?' message_after='Post deleted' message_show='1' action='trash']
Problem:
The user was losing the content template for posts on each post update.
Solution:
It turns out that this happens because of WPML. The content template does not have language information attached, which blocks them from being queried by Toolset. When saving a post, there is simply no content template to use.
The solution is to assign language information by running "Set language information" in WPML->Support->Troubleshooting, after a database backup.