abbyJ-2
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 | Topic | Supporter | Voix | Publications | Nouveauté |
|---|---|---|---|---|---|
|
Show All Related Post Type Items
Commencé par : abbyJ-2 in: Toolset Professional Support |
|
2 | 3 | Il y a 4 years, 3 months | |
|
Sorting by Custom Taxonomy
Commencé par : abbyJ-2 in: Toolset Professional Support |
|
2 | 5 | Il y a 4 years, 3 months | |
|
Related Post Types & Views
Commencé par : abbyJ-2
in: Toolset Professional Support
Problem: Solution: Relevant Documentation: |
|
2 | 13 | Il y a 4 years, 3 months | |
|
Children + Parent Taxonomy on Searches
Commencé par : abbyJ-2
in: Toolset Professional Support
Problem: Solution:
add_filter( 'wpv_filter_taxonomy_frontend_search_get_terms_args', 'prefix_modify_get_terms_args', 10, 3 );
function prefix_modify_get_terms_args( $args, $taxonomy, $view_id ) {
if ( $view_id == 1223 && $taxonomy == "topic") {
$args['parent'] = 0;
}
return $args;
}
Whereas for taxonomy views, prefer the wpv_filter_taxonomy_query hook. Something like:
add_filter( 'wpv_filter_taxonomy_query', 'prefix_modify_taxonomy_view_args', 99, 3 );
function prefix_modify_taxonomy_view_args( $tax_args, $view_settings, $view_id ) {
if ( $view_id == 1201 ) {
$tax_args['parent'] == 0;
}
return $tax_args
}
Relevant Documentation: |
|
2 | 7 | Il y a 4 years, 11 months |