felixG-2
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 |
---|---|---|---|---|---|
Blank Column for Conditional Statement
Started by: felixG-2 in: Toolset Professional Support |
|
2 | 6 | 5 years, 6 months ago | |
Using nested View in Archive Page
Started by: felixG-2 in: Toolset Professional Support |
|
2 | 3 | 5 years, 6 months ago | |
List nearby places with Toolset Map
Started by: felixG-2 in: Toolset Professional Support |
|
2 | 3 | 5 years, 6 months ago | |
Archive template group by parent post
Started by: felixG-2 in: Toolset Professional Support |
|
3 | 5 | 5 years, 7 months ago | |
One archive template for multiple custom post type
Started by: felixG-2
in: Toolset Professional Support
Problem: The issue here is that the user wanted to create 1 single view but use it across multiple different archive and switching the post type of the view. Solution: This is possible by overwriting the post type query for your view. Have a look at the custom query below. add_filter( 'wpv_filter_query', 'filter_post_type_func', 99, 3 ); function filter_post_type_func( $query_args, $view_settings, $view_id ) { if ( in_array($view_id, array(20356)) ) { if ( is_post_type_archive( 'CPTsluggoes here' ) ){ $query_args['post_type'] = 'cptslug goes here'; } if ( is_post_type_archive( 'CPTsluggoes here' ) ){ $query_args['post_type'] = 'cptslug goes here'; } if ( is_post_type_archive( 'CPTsluggoes here ) ){ $query_args['post_type'] = 'cptslug goes here'; } } return $query_args; } Replace the 20356 with the ID of your view and then replace "CPTsluggoes here" with the relevant slugs of your Custom Post Types. |
|
2 | 3 | 5 years, 7 months ago | |
Unassigned Custom Field Group Show Up in Relationship CPT
Started by: felixG-2 in: Toolset Professional Support |
|
2 | 11 | 5 years, 7 months ago |