Tim Elliott
In den letzten 30 Tagen erstellte Support-Threads: 0
Lieblings-Forenthemen
This user has no favorite topics.
Forum Topics Created
Status | Thema | Supporter | Stimmen | Artikel | Aktualität |
---|---|---|---|---|---|
Views Conditional wpv-post-author problem
Gestartet von: Tim Elliott
in: Toolset Professional Support
Problem: I have a conditional that tests the current User against the author of a post. The conditional works in the context of a post, but I would like to use the same conditional in another page where the post ID is set by a URL parameter. Solution: You could use a custom shortcode like this instead: [wpv-conditional if="('[wpv-current-user info='user_login']' eq '[author_login_from_post_id_param]')"] Content 2 [/wpv-conditional] Add this code to your child theme's functions.php file: function author_login_from_post_id_param_func($atts) { $postid = isset($_GET['postid']) ? $_GET['postid'] : 0; $thepost = $postid ? get_post($postid) : 0; $author = $thepost ? $thepost->post_author : 0; $login = $author ? get_the_author_meta('user_login', $author) : ''; return $login; } add_shortcode("author_login_from_post_id_param", "author_login_from_post_id_param_func"); Then go to Toolset > Settings > Frontend Content and register author_login_from_post_id_param in the third-party shortcodes section. |
2 | 3 | vor 6 Jahren, 6 Monaten | ||
Cred maximum upload size for file type field
Gestartet von: Tim Elliott
in: Toolset Professional Support
Problem: I would like to validate the file size of files uploaded to a custom field in CRED. Solution: Use the cred_form_ajax_upload_validate hook to test upload file sizes. Use conditionals to check each file individually. // For the resource file upload - check that the file is a PDF under 1MB in size. add_filter('cred_form_ajax_upload_validate','cred_filetype_size_validation',10,2); function cred_filetype_size_validation($error_fields, $form_data) { //field data are field values and errors list($fields,$errors)=$error_fields; //validate if specific form if ( ($form_data['id']==889) || ($form_data['id']==846) ) { if(isset($fields['wpcf-resource-file'])) { //Retrieve file type $file_type_uploaded=$fields['wpcf-resource-file']['field_data']['type']; //Retrieve file size $file_size_uploaded=$fields['wpcf-resource-file']['field_data']['size']; //check if featured image exists if ( ($file_size_uploaded > 1000000) || ($file_type_uploaded != 'application/pdf') ) { //set error message for featured image $errors['Resource File'] = 'Sorry the file you have uploaded is not of correct type (PDF) or exceeded 1MB limit'; } } } //return result return array($fields,$errors); } Relevant Documentation: |
2 | 5 | vor 6 Jahren, 6 Monaten | ||
CRED create new child post with parent set automatically.
Gestartet von: Tim Elliott
in: Toolset Professional Support
Problem: For example: [cred_generic_field field='_wpcf_belongs_home_id' type='hidden' class='' urlparam=''] { "required":0, "validate_format":0, "persist":1, "default":"[wpv-post-id]" } [/cred_generic_field] You can find proposed solution, in this case, with the following reply: Relevant Documentation: |
2 | 5 | vor 6 Jahren, 6 Monaten | ||
Follow up to „Membership to allow access to front-end editing of specific posts“
Gestartet von: Tim Elliott
in: Toolset Professional Support
Problem: I am using Toolset form and CRED commerce plugins, if the customer fails to complete checkout, instead of changing the post status to "Pending" or "Draft" it just changes the free-premium field to free? Solution: I suggest you try this: 1) In your CRED form, but don't display "free-premium" field, so when user submit the CRED form, it won't change the value of "free-premium" field. 2) After the users submit the CRED form and complete the Woocommerce order, use the CRED commerce action hook "cred_commerce_after_order_completed" to trigger a custom PHP function, in this function, update the "free-premium" field to what you want. See the codes provided by client: Relevant Documentation: Action to be executed after WooCommerce order status is set to completed. |
2 | 4 | vor 6 Jahren, 6 Monaten | ||
Membership to allow access to front-end editing of specific posts.
Gestartet von: Tim Elliott in: Toolset Professional Support |
2 | 3 | vor 6 Jahren, 6 Monaten | ||
View content overlays my spinner overlay
Gestartet von: Tim Elliott in: Toolset Professional Support |
2 | 4 | vor 6 Jahren, 7 Monaten | ||
Designating a post as featured within a category
Gestartet von: Tim Elliott in: Toolset Professional Support |
2 | 6 | vor 6 Jahren, 8 Monaten | ||
Custom Taxonomy functionality not working
Gestartet von: Tim Elliott
in: Toolset Professional Support
Problem: The issue here is that the user is unable to edit his custom taxonomy created in Types. Solution: Normally issues like these are caused by either a plugin/theme conflict or the server is using an outdated version of PHP. First I would recommend that you temporarily disable all the non-toolset plugins and try again. If that doesn't work please ensure that your server is running at least php 7 |
2 | 8 | vor 6 Jahren, 8 Monaten | ||
[Potential bug report] post relationships
Gestartet von: Tim Elliott in: Toolset Professional Support |
2 | 15 | vor 6 Jahren, 9 Monaten | ||
[wpv-add-to-cart-message] doesn't always display messages immediately
Gestartet von: Tim Elliott in: Toolset Professional Support |
2 | 6 | vor 6 Jahren, 9 Monaten | ||
User meta is not displaying any output
Gestartet von: Tim Elliott in: Toolset Professional Support |
2 | 7 | vor 6 Jahren, 10 Monaten | ||
Converting a timestamp to date and time
Gestartet von: Tim Elliott
in: Toolset Professional Support
Problem: Solution: // Add Shortcode function convert_date( $atts ) { // Attributes $atts = shortcode_atts( array( 'timestamp' => '', ), $atts ); $date = Date('F j, Y, g:i a',$atts['timestamp']); return $date; } add_shortcode( 'convert_date', 'convert_date' ); Then pass the other shortcode into it link this [convert_date timestamp="[wpv-post-field name='we_startdate']"] |
3 | 4 | vor 6 Jahren, 11 Monaten | ||
Error when updating Views to v2.5
Gestartet von: Tim Elliott in: Toolset Professional Support |
2 | 9 | vor 7 Jahren, 1 Monat | ||
Condiional Display for repeatable group applied to whole group.
Gestartet von: Tim Elliott in: Toolset Professional Support |
2 | 14 | vor 7 Jahren, 1 Monat | ||
Getting multiple Warning: Illegal string offset after adding a repeating field
Gestartet von: Tim Elliott
in: Toolset Professional Support
Problem: Warning: Illegal string offset 'id' in /home/xxx/public_html/wp-content/plugins/types/vendor/toolset/types/embedded/classes/wpviews.php on line 137 Warning: Illegal string offset 'name' in /home/xxx/public_html/wp-content/plugins/types/vendor/toolset/types/embedded/classes/wpviews.php on line 138 Warning: Illegal string offset 'slug' in /home/xxx/public_html/wp-content/plugins/types/vendor/toolset/types/embedded/includes/fields.php on line 719 Warning: Illegal string offset 'type' in /home/xxx/public_html/wp-content/plugins/types/vendor/toolset/types/embedded/includes/fields.php on line 722 Warning: Illegal string offset 'slug' in /home/xxx/public_html/wp-content/plugins/types/vendor/toolset/types/embedded/includes/fields.php on line 723 Warning: Illegal string offset 'id' in /home/xxx/public_html/wp-content/plugins/types/vendor/toolset/types/embedded/classes/wpviews.php on line 140 Solution: |
2 | 3 | vor 7 Jahren, 1 Monat |