bastienB
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 |
---|---|---|---|---|---|
Create custom page for WC Products Collection
Started by: bastienB in: Toolset Professional Support |
2 | 6 | 4 years, 2 months ago | ||
Displaying WC Products which belong to Relationship based on CPT
Started by: bastienB
in: Toolset Professional Support
Problem: We want to pull a list of product IDs which have a Design associated to the Creator you are viewing. Solution: It needs a nested view, for example: Relevant Documentation: |
2 | 5 | 4 years, 3 months ago | ||
Autoloaded data wpcf_checkbox_migration
Started by: bastienB in: Toolset Professional Support |
2 | 5 | 4 years, 5 months ago | ||
Create a universal product description block
Started by: bastienB in: Toolset Professional Support |
2 | 2 | 4 years, 5 months ago | ||
Query filter fallback for a view
Started by: bastienB
in: Toolset Professional Support
Problem: I have a View and I want to ensure that 4 results are always displayed. I can set a limit of 4, but I would also like to know how to append random results as needed if the number of results is less than 4. Solution: Use the Views Filter wpv_filter_query_post_process to manipulate the result set programmatically. Use WP_Query to fetch random results that aren't included in the results already, and then append those to the current results. Example: add_filter( 'wpv_filter_query_post_process', 'nh_modify_related_gt_query', 10, 3 ); function nh_modify_related_gt_query( $query, $view_settings, $view_id ) { if( $view_id = '22313' ) { // Applies to "Related Glossary Terms (4)" view if ( sizeof( $query->posts ) < 4 ) { // if the query has less than 4 related terms $fillsize = 4 - sizeof( $query->posts ); $post_ids = wp_list_pluck( $query->posts, 'ID' ); $args = array( 'post_type' => 'glossary', 'posts_per_page' => $fillsize, 'post__not_in' => $post_ids, 'orderby' => 'rand', 'no_found_rows' => true ); $fillquery = new WP_Query( $args ); $initposts = $query->posts; $randposts = $fillquery->posts; $filled_terms = array_merge($initposts, $randposts); $query->posts = $filled_terms; // add the random posts at the end of the posts result array $query->found_posts = 4; // modify the count of found posts $query->post_count = 4; // modify the count of displayed posts } } return $query; } Relevant Documentation: |
2 | 11 | 4 years, 10 months ago | ||
Configure a user profile picture that supports Gravatar and custom upload
Started by: bastienB in: Toolset Professional Support |
3 | 7 | 4 years, 10 months ago | ||
Can I create a complex membership + marketplace site with Toolset?
Started by: bastienB in: Toolset Professional Support |
3 | 8 | 5 years, 1 month ago | ||
Create a CPT with undefined structure and size
Started by: bastienB in: Toolset Professional Support |
2 | 2 | 5 years, 1 month ago | ||
Dynamically change slug based on parent CPT
Started by: bastienB in: Toolset Professional Support |
2 | 2 | 5 years, 1 month ago | ||
Create a Glossary page
1
2
Started by: bastienB in: Toolset Professional Support |
3 | 19 | 5 years, 2 months ago | ||
WooCommerce Views breaks custom WooCommerce template
Started by: bastienB in: Toolset Professional Support |
2 | 11 | 5 years, 2 months ago | ||
CPT terms not returned in search results
Started by: bastienB in: Toolset Professional Support |
2 | 10 | 5 years, 2 months ago | ||
Using a custom permalink structure
Started by: bastienB in: Toolset Professional Support |
2 | 6 | 5 years, 2 months ago | ||
Add expiration to posts
Started by: bastienB
in: Toolset Professional Support
Problem: Solution: This allows to set the post (if created through Toolset Forms) to another post state after a certain time is passed. It does not allow to update custom fields or there like - for that custom code would be needed. However usually the post status is enough to "let a post expire". |
2 | 7 | 5 years, 2 months ago | ||
Create a Featured section in the CPT archive
Started by: bastienB in: Toolset Professional Support |
2 | 4 | 5 years, 2 months ago |