richardB-16
Support threads created in the last 30 days: 0
Favorite Forum Topics
This user has no favorite topics.
Forum Topics Created
Status | Topic | Supporter | Voices | Posts | Freshness |
---|---|---|---|---|---|
Deleting record from front end
Started by: richardB-16 in: Toolset Professional Support |
2 | 2 | 3 years, 5 months ago | ||
Change front end author
Started by: richardB-16
in: Toolset Professional Support
Problem: The issue here is that the user wanted to change the author of the posts from the frontend. Solution: This is possible to do if you've created a generic form field that you've populated with the Name and ID of the users you want to be the possible selections for authors. To get started this will essentially be an edit form for the post with all other fields removed. Then under Generic Fields you will add a generic Select Field. For the Labels you will add the Authors name and for the Value you will add the ID of that author. This list will need to be maintained manually with all the users on your site that will be authors. See My Screenshot The next step is to add the form to the page and then use the code below to trigger the author update once the form is submitted. add_action( 'cred_save_data', 'tssupp_change_author', 10, 2 ); function tssupp_change_author( $post_id, $form_data ){ if ( in_array( $form_data['id'], array( 123 ) ) && !empty($_POST['authors'])) { $post = array( 'ID' => $post_id, 'post_author' => $_POST['authors'] ); wp_update_post( $post ); } } Now you will need to change 123 to the ID of the edit form and the 'authors' to the slug of the generic field that you had created. This code can be added to the Toolset Custom code section in Toolset -> Settings -> Custom Coding. Once you've added the code you will then need to activate it. Once activated and the information added to the code and form is correct then you should be able to successfully change the post author. |
2 | 3 | 3 years, 9 months ago | ||
Reporting/record count
Started by: richardB-16 in: Toolset Professional Support |
2 | 3 | 3 years, 11 months ago | ||
bulk edit in database
Started by: richardB-16 in: Toolset Professional Support |
2 | 7 | 4 years ago | ||
Call queueing system
1
2
Started by: richardB-16 in: Toolset Professional Support |
2 | 20 | 4 years ago | ||
Display post modified author in Form
Started by: richardB-16
in: Toolset Professional Support
Problem: I would like to display the current post author inside an Edit Post Form, and when the User submits edits to the post I would like to set that User as the new post author. Solution: Use the cred_save_data hook to programmatically set the post author when the Form is submitted. To display the current post author in the Form, use a Views shortcode like wpv-post-author. Relevant Documentation: |
2 | 5 | 4 years, 1 month ago | ||
Edit form get ID
Started by: richardB-16 in: Toolset Professional Support |
2 | 5 | 4 years, 4 months ago | ||
front end relational form not submitting
Started by: richardB-16
in: Toolset Professional Support
Problem: Solution: You can find the proposed solution in this case with the following reply: Relevant Documentation: |
2 | 7 | 4 years, 5 months ago | ||
Filtering form results by parent
Started by: richardB-16
in: Toolset Professional Support
Problem: Solution: Relevant Documentation: |
2 | 4 | 4 years, 5 months ago | ||
fatal error
Started by: richardB-16 in: Toolset Professional Support |
1 | 2 | 4 years, 5 months ago |