Sauter la navigation

[Résolu] order applied to all views

This support ticket is created Il y a 4 années et 1 mois. There's a good chance that you are reading advice that it now obsolete.
Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

Ce sujet contient 0 réponse, a 1 voix.

Dernière mise à jour par garenM Il y a 4 années et 1 mois.

Assisté par: Jamal.

Auteur
Publications
#2018275

hey i made a custom order in a toolset view but its apply in all views that i have in the site

function add_custom_fiels_to_view_query($query_args, $view_settings, $view_id ) {
if ( $view_id == 1251 ){

$meta_query = array();
$meta_query[] = array('key' => 'wpcf-single-image');
if ( !isset($query_args['meta_query']) ){
$query_args['meta_query'] = array();
}
$query_args['meta_query'] = array_merge($meta_query, $query_args['meta_query']);

return $query_args;
} else{
return;
}
}

there is something else that i have to do? can you advise?