Hi Wakar,
Thank you for the help. I did the top members part and it shows correctly with the 2 tabs visible, however, when I added the second one with the bottom members the tabs are not visible except the priority one. When I give an array to add all and make the midwives first it is not showing the 'administrators' and underneath shows all members:
// filter bottom-members by priority category shows only 'midwives ' tab above the members
add_filter( 'wpv_filter_query', 'filter_include_cat_fn_159', 1000 , 3 );
function filter_include_cat_fn_159 ( $query_args, $view_settings ) {
if ( (isset($view_settings['view_id'])) && ($view_settings['view_id'] == 159) ) {
if(empty($query_args['tax_query']))
{
$query_args['tax_query'][0]['taxonomy'] = 'bottom-position';
$query_args['tax_query'][0]['field'] = 'slug';
$query_args['tax_query'][0]['terms'][0] = 'midwives';
$query_args['tax_query'][0]['operator'] = 'IN';
$query_args['tax_query'][0]['include_children'] = '';
$query_args['tax_query']['relation'] = 'AND';
}
}
return $query_args;
}
// adding filter bottom-members by priority category with array starting with 'midwives ' from the tabs above the 'administration is not displayed
add_filter( 'wpv_filter_query', 'filter_include_cat_fn_159', 1000 , 3 );
function filter_include_cat_fn_159( $query_args, $view_settings ) {
if ( isset( $view_settings['view_id'] ) && $view_settings['view_id'] == 159 ) {
// Ensure we're modifying the correct query arguments
if ( empty( $query_args['tax_query'] ) ) {
// If tax_query is empty, initialize it
$query_args['tax_query'][0]['taxonomy'] = 'bottom-position';
$query_args['tax_query'][0]['field'] = 'slug';
$query_args['tax_query'][0]['terms'] = array( 'midwives', 'nurses', 'administration', 'accounting', 'services' );
$query_args['tax_query'][0]['operator'] = 'IN';
$query_args['tax_query'][0]['include_children'] = '';
$query_args['tax_query']['relation'] = 'AND';
}
}
return $query_args;
}
Why the bottom members tabs cannot be shown like the top members but only 'midwives' active and when I add array the 'administration' is missing? I various tried combinations with selecting by IDs, Types, Names and no success.
Thank you in advance for your assistance.
Regards,
Vessy