Will Toolset plan to leave the API?
Started by: kelvinL-2
in: Toolset Professional Support
Quick solution available
Problem:
The issue here is that the user wanted to know if Toolset will abandon the API functions that are available.
Solution:
Given that the API functions are apart of our core functions that give users the flexibility to perform customisations, there aren't any plans to abandon the API.
2
7
4 years, 6 months ago
kelvinL-2
Excluding a specific category from posts view with front end filter…
Started by: riccardoU
in: Toolset Professional Support
Quick solution available
Problem:
The user would like to exclude posts assigned to a certain taxonomy term. And also be able to use a filter on the same taxonomy.
Solution:
This will require custom code such as:
add_filter( 'wpv_filter_query', 'exclude_terms_func', 10, 3 );
function exclude_terms_func($query, $setting, $views_ID)
{
if($views_ID == 3346) // your view id
{
$query['tax_query'][] = array(
'taxonomy' => 'book-author', // taxonomy name
'field' => 'slug',
'terms' => array( 'adam', 'adam2016' ), // term slug for exclude
'operator' => 'NOT IN'
);
$query['tax_query']['relation'] = 'AND';
}
return $query;
}
Relevant Documentation:
2
17
4 years, 6 months ago
riccardoU