wesselK
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 |
---|---|---|---|---|---|
Trying to filter by location from parent address
Started by: wesselK in: Toolset Professional Support |
2 | 5 | 2 years, 8 months ago | ||
Distance sorting doesn't work after moving to live website
Started by: wesselK in: Toolset Professional Support |
2 | 7 | 2 years, 10 months ago | ||
Order view by distance after giving in current location
Started by: wesselK in: Toolset Professional Support |
2 | 8 | 2 years, 10 months ago | ||
Toolset maps distance not working
Started by: wesselK in: Toolset Professional Support |
2 | 9 | 3 years, 6 months ago | ||
Filter results of wpv_filter_query
Started by: wesselK
in: Toolset Professional Support
Problem: The issue here is that the user wanted to know how to programatically modify the views query. Solution: |
2 | 9 | 3 years, 6 months ago | ||
Avada tabs not working
Started by: wesselK
in: Toolset Professional Support
Problem: Solution: This problem was actually being caused by Toolset loading the Bootstrap css. Disabling the Bootstrap loading by Toolset resolved the issue. To disable the Bootstrap loading go to Toolset -> Settings and scroll to Bootstrap loading and select "The theme or another plugin is already loading Bootstrap 4" |
2 | 8 | 3 years, 7 months ago | ||
Two relationships in view using WP_Query and wpv_filter_query
Started by: wesselK
in: Toolset Professional Support
Problem: The issue here is that the user wants to filter the current view by 2 post relationships from different post types. Solution: This can be resolved by using the code below. //Return only posts from the current author when listing posts of type company: function tssupp_filter_query( $query_args, $view_settings, $view_id ) { if($view_id == 123){ $query_args['toolset_relationships'] = array( array( 'role' => 'child', 'related_to' => 63, 'relationship' => 'leverancier-categorie-leverancier' ), array( 'role' => 'child', 'related_to' => 51, 'relationship' => 'vestiging-leverancier' ) ); } return $query_args; } add_filter( 'wpv_filter_query', 'tssupp_filter_query', 99, 3 ); This can be added to the Toolset Custom code section in Toolset->Settings->Custom Code. Change the 123 to the ID of your view and adjust the relationship slug and related_to to the correct ID of the posts. Relevant Documentation: |
2 | 11 | 3 years, 10 months ago | ||
Trying to count childeren of a parent
Started by: wesselK
in: Toolset Professional Support
Problem: I would like to create a custom shortcode that displays the number of child posts for the current parent post. I'm referencing an older ticket but it does not seem to work as expected. Solution: Instead of the _wpcf_belongs_slug_id postmeta key, you must use the new post relationships API with post relationships created in Types 3.0+. A custom shortcode solution is available. add_shortcode( 'tssupp-connections', function( $atts = [] ){ // provide defaults $atts = shortcode_atts( array( 'relationship' => '', ), $atts ); global $post; $count = 0; $relationship = toolset_get_relationship( $atts['relationship'] ); if ( $relationship ) { $parent = $relationship['roles']['parent']['types'][0]; $child = $relationship['roles']['child']['types'][0]; $type = $post->post_type; $origin = ( $parent == $type ) ? 'parent' : 'child'; // Get connected posts $connections = toolset_get_related_posts( $post->ID, $atts['relationship'], array( 'query_by_role' => $origin, 'role_to_return' => 'other', 'need_found_rows' => true ) ); $count = $connections['found_rows']; } return $count; }); Use it like this: Number of children: [tssupp-connections relationship="project-task"][/tssupp-connections] Relevant Documentation: |
2 | 3 | 3 years, 10 months ago | ||
Add url parameter of post id inside a template
Started by: wesselK in: Toolset Professional Support |
2 | 3 | 3 years, 10 months ago | ||
Repeatable field inside search view
Started by: wesselK
in: Toolset Professional Support
Problem: I would like to display a list of repeatable field groups (RFG) inside the results of a custom search View. Solution: Use the legacy Views editor to build the nested View, then insert it in the loop of the block editor View using a shortcode. |
2 | 3 | 3 years, 10 months ago | ||
Avada settings not working on Content Template
Started by: wesselK in: Toolset Professional Support |
2 | 2 | 4 years, 8 months ago | ||
Support toolset_get_field_instance() for terms
Started by: wesselK in: Toolset Professional Support |
2 | 2 | 4 years, 11 months ago | ||
Repeatable form group still shown after deleting parent post
Started by: wesselK in: Toolset Professional Support |
2 | 3 | 5 years, 1 month ago | ||
Create hierarchical taxonomy search filters
Started by: wesselK in: Toolset Professional Support |
3 | 5 | 5 years, 1 month ago |