cristianoT
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 |
---|---|---|---|---|---|
Map with position from custom post type in a divi site
Started by: cristianoT in: Toolset Professional Support |
2 | 13 | 2 years, 6 months ago | ||
Relater post type filtered by taxonomy
Started by: cristianoT
in: Toolset Professional Support
Problem: The issue here is that the user wanted to prefilter their post reference field options. In this case they wanted to retrieve specific posts from a particular taxonomy. Solution: This can be done by using the hook below. /** * Limit the posts offered in the Post Reference dropdown to those with a particular term assigned * * Edit * 1. the slug of the post type in the if statement as required ('review' in this example) as well as the custom field slug 'wpcf-my-reference' * 2. the slug of the taxonomy ('colour' in this example) * 3. the slug(s) of the terms that should match ('red' in this example) */ function ts_filter_related_post_selector( $query ) { if ( defined('DOING_AJAX') && $_REQUEST['action'] === 'types_post_reference_field' && $_REQUEST['field_slug'] === 'wpcf-my-reference' && $query->query['post_type'][0] === 'review' ) { // edit $taxquery = array( array( 'taxonomy' => 'colour', // edit 'field' => 'slug', 'terms' => array('red'), // edit 'operator' => 'IN' ) ); $query->set('tax_query', $taxquery); } } add_action('pre_get_posts', 'ts_filter_related_post_selector'); Add this code to the Toolset Custom code settings at Toolset -> Settings -> Custom Code and activate it. |
3 | 5 | 3 years, 2 months ago | ||
Show post into a page based on page cutom field
Started by: cristianoT in: Toolset Professional Support |
2 | 2 | 3 years, 3 months ago | ||
When I modify a custom post it loses the template
Started by: cristianoT in: Toolset Professional Support |
2 | 3 | 4 years, 8 months ago | ||
Use a custom post layout on the second language (WPML)
1
2
Started by: cristianoT in: Toolset Professional Support |
2 | 17 | 5 years, 3 months ago | ||
How to filter from URL param
1
2
Started by: cristianoT in: Toolset Professional Support |
2 | 16 | 5 years, 8 months ago | ||
Filter a view with a value passed from a custom type url
1
2
Started by: cristianoT in: Toolset Professional Support |
3 | 25 | 5 years, 9 months ago |