PiotrO586
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 |
---|---|---|---|---|---|
Moving child posts to trash upon parent is sent to trash
Started by: PiotrO586
in: Toolset Professional Support
Problem: 1. what hook can be used to trigger a function to send child posts to trash? Apparently wp_trash_post doesn't work here? 2. Upon upgrading Types to the latest release the following fragment wouldn't work (_wpcf_belongs is not part of the meta_key anymore?): Solution: Q1) Toolset form plugin is also using function wp_trash_post() to trash the post, so the wordpress action hook "wp_trash_post" should work too, more help: https://developer.wordpress.org/reference/hooks/wp_trash_post/ Fires before a post is sent to the trash. Q2) Yes, for the new post type relationship, please try the new Typers API function toolset_get_related_posts(): Query related posts by a set of conditions. Relevant Documentation: |
2 | 4 | 6 years, 4 months ago | ||
Hide Toolset buttons from the post content rich text editor for non-admins
Started by: PiotrO586
in: Toolset Professional Support
Problem: Solution: /** * Remove Toolset buttons on front-end editors * which appear for role author+ when insert * media option set on CRED forms * * The filters work globally, so you need * to specify the pages where the * CRED form is added */ function remove_toolset_buttons(){ // $post not available with init hook $postID = url_to_postid( $_SERVER['REQUEST_URI'] , '_wpg_def_keyword', true ); $target_pages = array( 10, 25, 66 ); // Edit for pages with CRED forms if ( in_array( $postID, $target_pages ) ) { // remove the Fields and Views button add_filter( 'toolset_editor_add_form_buttons', '__return_false' ); // remove the CRED button add_filter( 'toolset_cred_button_before_print', '__return_false' ); // remove the Access button for certain roles add_filter( 'toolset_editor_add_access_button', function(){ $roles = array( 'author', 'subscriber' ); return $roles; } ); } } add_action( 'init', 'remove_toolset_buttons' ); |
2 | 5 | 6 years, 4 months ago | ||
"There was an error uploading your file" when uploading image
Started by: PiotrO586 in: Toolset Professional Support |
2 | 3 | 6 years, 4 months ago | ||
Limit parent posts in Form select field to user’s own posts
Started by: PiotrO586
in: Toolset Professional Support
Problem: Solution: |
2 | 3 | 6 years, 5 months ago | ||
Require first and last name in a User Form
Started by: PiotrO586
in: Toolset Professional Support
Problem: I would like to make the first_name and last_name fields required in a User (CRED) Form, and I would like to make the error message translatable. The code I have doesn't seem to be working. Solution: add_filter('cred_filter_field_before_add_to_form', 'required_user_fields_func', 10, 2); function required_user_fields_func($field, $computed_values){ if(in_array($field['id'], array('first_name', 'last_name'))){ $field['data'] = is_array($field['data']) ? $field['data'] : array(); $field['data']['validate']['required'] = array ( 'active' => 1, 'value' => 1, 'message' => __('This field is required', 'your-theme-context'); ); } return $field; } |
2 | 6 | 6 years, 5 months ago | ||
Accordion and Forms
Started by: PiotrO586
in: Toolset Professional Support
Problem: Solution: ( function( $ ) { $( document ).ready( function(){ let url = new URL(location.href); let success = url.searchParams.get("_success_message"); if ( success ) { $(".panel-group .panel:nth-child(2) a").click(); } }); })( jQuery ); |
2 | 5 | 6 years, 5 months ago | ||
Numeric field updown buttons
Started by: PiotrO586 in: Toolset Professional Support |
2 | 3 | 6 years, 5 months ago | ||
Archive to show only posts having parents – Types 3.0
Started by: PiotrO586 in: Toolset Professional Support |
2 | 5 | 6 years, 5 months ago | ||
Check if parent post exists
Started by: PiotrO586
in: Toolset Professional Support
Problem: Solution: For example: [wpv-conditional if="( '[wpv-post-id item="@relationship-slug.parent"]' ne '' )"] parent exists [/wpv-conditional] You can find proposed solution, in this case, with the following reply: Relevant Documentation: |
2 | 8 | 6 years, 5 months ago | ||
Product parent post issue
Started by: PiotrO586
in: Toolset Professional Support
Problem: When I include a Content Template shortcode or a wpv-woo-display-tabs shortcode, information from the current post is displayed instead of information from the parent post. Solution: This issue has been resolved in the latest version of Toolset plugins. |
2 | 7 | 6 years, 5 months ago | ||
Hyperlinking repeatable fields in a carousel
Started by: PiotrO586
in: Toolset Professional Support
Problem: Solution: You can find proposed solution, in this case, with the following reply: Relevant Documentation: |
2 | 5 | 6 years, 5 months ago | ||
Add/edit multilingual content using CRED forms
Started by: PiotrO586
in: Toolset Professional Support
Problem: Solution: You can find proposed solution, in this case, with the following reply: Relevant Documentation: |
2 | 3 | 6 years, 6 months ago | ||
[wpv-item] and spaces
Started by: PiotrO586
in: Toolset Professional Support
Problem: Remove blank space within Views loop. Solution: You can try to merge all codes into one single line, see the solution here: Relevant Documentation: |
2 | 3 | 6 years, 6 months ago | ||
Archive to show only posts having parents
Started by: PiotrO586 in: Toolset Professional Support |
2 | 3 | 6 years, 6 months ago | ||
CRED form with uploading files
Started by: PiotrO586
in: Toolset Professional Support
Problem: Solution: You can find proposed solution, in this case, with the following reply: Relevant Documentation: |
2 | 5 | 6 years, 6 months ago |