bastienB
Fils de soutien créés au cours des 30 derniers jours : 0
Sujets de forum favoris
This user has no favorite topics.
Sujets de forum créés
Status | Sujet | Supporter | Voix | Publications | Nouveauté |
---|---|---|---|---|---|
Create custom page for WC Products Collection
Commencé par : bastienB in: Toolset Professional Support |
|
2 | 6 | Il y a 4 années et 5 mois | |
Displaying WC Products which belong to Relationship based on CPT
Commencé par : 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 | Il y a 4 années et 5 mois | |
Autoloaded data wpcf_checkbox_migration
Commencé par : bastienB in: Toolset Professional Support |
|
2 | 5 | Il y a 4 années et 7 mois | |
Create a universal product description block
Commencé par : bastienB in: Toolset Professional Support |
|
2 | 2 | Il y a 4 années et 8 mois | |
Query filter fallback for a view
Commencé par : 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 | Il y a 5 années | |
Configure a user profile picture that supports Gravatar and custom upload
Commencé par : bastienB in: Toolset Professional Support |
|
3 | 7 | Il y a 5 années | |
Can I create a complex membership + marketplace site with Toolset?
Commencé par : bastienB in: Toolset Professional Support |
|
3 | 8 | Il y a 5 années et 4 mois | |
Create a CPT with undefined structure and size
Commencé par : bastienB in: Toolset Professional Support |
|
2 | 2 | Il y a 5 années et 4 mois | |
Dynamically change slug based on parent CPT
Commencé par : bastienB in: Toolset Professional Support |
|
2 | 2 | Il y a 5 années et 4 mois | |
Create a Glossary page
1
2
Commencé par : bastienB in: Toolset Professional Support |
|
3 | 19 | Il y a 5 années et 4 mois | |
WooCommerce Views breaks custom WooCommerce template
Commencé par : bastienB in: Toolset Professional Support |
|
2 | 11 | Il y a 5 années et 4 mois | |
CPT terms not returned in search results
Commencé par : bastienB in: Toolset Professional Support |
|
2 | 10 | Il y a 5 années et 4 mois | |
Using a custom permalink structure
Commencé par : bastienB in: Toolset Professional Support |
|
2 | 6 | Il y a 5 années et 4 mois | |
Add expiration to posts
Commencé par : 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 | Il y a 5 années et 4 mois | |
Create a Featured section in the CPT archive
Commencé par : bastienB in: Toolset Professional Support |
|
2 | 4 | Il y a 5 années et 4 mois |