himanshuS
Support threads created in the last 30 days: 1
Favorite Forum Topics
This user has no favorite topics.
Forum Topics Created
Status | Topic | Supporter | Voices | Posts | Freshness |
---|---|---|---|---|---|
How to get author picture stored in custom image field?
Started by: himanshuS
in: Toolset Professional Support
Problem: I would like to display an iamge stored in a Types User Field, but the Views shortcodes wpv-user and wpv-post-author don't seem to be working correctly. Solution: Use the Types Field API types_render_usermeta or the Types Field shortcode to display an image from a Types User Custom Field. Shortcode example: [types usermeta="your-field-slug" alt="blue bird" width="300" height="200" proportional="true" user_is_author="true"][/types] PHP API example: types_render_usermeta("your-field-slug", array( "alt" => "blue bird", "width" => "300", "height" => "200", "proportional" => "true", "user_is_author" => "true" ) ); Relevant Documentation: https://toolset.com/documentation/customizing-sites-using-php/functions/#image |
2 | 4 | 3 years, 10 months ago | ||
How to make a field read only on post form?
Started by: himanshuS
in: Toolset Professional Support
Problem: Solution: (function( $ ) { $('select[name="@project-prompt-to-project-submission.parent"]').attr('disabled',true); })(jQuery); Relevant Documentation: |
2 | 9 | 3 years, 10 months ago | ||
Best practice when deleting posts related to other posts
Started by: himanshuS
in: Toolset Professional Support
Problem: Solution: - Simple way(if users interact with the system only from the frontend). Wrap the delete link of a post inside a conditional shortcode. The conditions should check if the post has any related posts in different relationships. We have published a snippet that actually deletes the related posts when a post is deleted, it may inspire you if you want to implement the custom code solution https://kb.onthegosystems.com/code-snippet/automatically-delete-child-posts-when-parent-is-deleted/ |
2 | 5 | 3 years, 10 months ago | ||
See User Profile after Registering User with Cred
1
2
Started by: himanshuS in: Toolset Professional Support |
2 | 33 | 3 years, 10 months ago | ||
Add custom post dynamically to menu
Started by: himanshuS in: Toolset Professional Support |
1 | 2 | 3 years, 10 months ago | ||
Unable to send email with trigger – when post is published
Started by: himanshuS in: Toolset Professional Support |
2 | 12 | 3 years, 10 months ago | ||
Show only terms created by current user in taxonomy dropdown on the form
Started by: himanshuS
in: Toolset Professional Support
Problem: I have a Form used to create posts. There is a taxonomy field in the Form so Users can choose which term(s) to apply to the new post. I would like to display only terms that were created by the current logged-in User. Solution: Since WordPress does not natively track the author of each term, you must programmatically add that term author ID in a custom field associated with each term when the term is created. Once that custom field value is added successfully, you can then use the get_terms hook to filter the terms available in the taxonomy field options. Here is an example of the code: // RESTRICT TAXONOMY TERM FIELD OPTIONS TO USER'S OWN TERMS BY TERM FIELD VALUE // https://toolset.com/forums/topic/show-only-terms-created-by-current-user-in-taxonomy-dropdown-on-the-form/ function tssupp_terms_by_current_user( $terms, $taxonomies, $args, $term_query ){ $pages = array( 123, 456 ); // comma-separated list of page IDs where this Form is displayed $taxonomy_slug = 'tax-slug'; // slug of the taxonomy to filter $author_field_slug = 'field-slug'; // slug of the post author id field // you should not edit below this line // loop over each term and get its custom field value // compare that field value against the current user id and drop any terms with a different value $user_id = get_current_user_id(); if ( is_page( $pages ) && $taxonomies[0] == $taxonomy_slug ) { foreach($terms as $key=>$term) { $term_author = get_term_meta($term->term_id, 'wpcf-' . $author_field_slug, true); if( $term_author != $user_id ) { unset( $terms[$key] ); } } } return $terms; } add_filter( 'get_terms', 'tssupp_terms_by_current_user',10,4); Relevant Documentation: |
2 | 10 | 3 years, 10 months ago | ||
Display custom taxonomy used by current user?
Started by: himanshuS
in: Toolset Professional Support
Problem: I have two taxonomies: 1) skill categories and , 2) industry categories. Skill categories and industry have multiple terms defined in them. Say 20 in skills and 5 in industry. There are 5 CPTs that use the above two taxonomies. When users submit custom posts for these 5 CPTs, they add terms from the two custom taxonomies. Solution: You might consider below workaround: Nested views: https://toolset.com/forums/topic/display-custom-taxonomy-used-by-current-user/#post-1884635 Relevant Documentation: |
2 | 9 | 3 years, 10 months ago | ||
URL custom field does not take address with http:// or https://
Started by: himanshuS in: Toolset Professional Support |
2 | 5 | 3 years, 10 months ago | ||
Unable to restrict taxonomy dropdown selection limit
Started by: himanshuS in: Toolset Professional Support |
2 | 5 | 3 years, 10 months ago | ||
Blank field in taxonomy dropdown
Started by: himanshuS in: Toolset Professional Support |
2 | 4 | 3 years, 10 months ago | ||
Custom dropdown for relationship field based on user role
Started by: himanshuS
in: Toolset Professional Support
Problem: Customize parent selector dropdown of post form by user roles. Solution: There isn't such kind of built-in feature within Toolset Forms, you might consider custom codes to setup a HTML select dropdown to replace it. Relevant Documentation: |
2 | 3 | 3 years, 11 months ago | ||
Where is parent post id stored in DB for O2O relationship
Started by: himanshuS
in: Toolset Professional Support
Problem: 1) get related posts using custom PHP codes. 2) Where is parent post id stored in DB for O2O relationship Solution: Please follow our document to setup your custom PHP codes: If there are multiple related posts(O2M and M2M relationships), please check function toolset_get_related_posts() And the post relationship data are saved in your database tables: - wp_toolset_associations Relevant Documentation: |
2 | 6 | 3 years, 11 months ago | ||
How to edit a draft post and the published post on the same page
Started by: himanshuS in: Toolset Professional Support |
2 | 2 | 3 years, 11 months ago | ||
Access control bug: unable to drag bar to the right on form access control tab
Started by: himanshuS
in: Toolset Professional Support
Problem: The Access settings for Post forms are configured at Toolset > Access Control > Toolset Forms, by expanding the section for front-end Post forms. That section is currently broken. The checkboxes don’t respond to clicks, and horizontal scrolling to see settings that don’t fit the page does not work. Solution: This issue is fixed in the latest version of Toolset Access plugin 2.8.10, you can download it here: https://toolset.com/account/downloads/ Relevant Documentation: |
2 | 5 | 3 years, 11 months ago |