The forums are closed and will be removed when we launch our new site.
Looking for support? You can access the support system via your account.
The forums are closed and will be removed when we launch our new site.
Looking for support? You can access the support system via your account.
Forums › Forums › Search & Filter Pro › Settings & Default / Post (wrong default order)
Is there more that you want from me at this time? I am not sure.
I just want my result in order of date on this page
http://dev-patriote.erod.ca/programmation/
But I cannot understand why 5 of them aren’t in the good order.
I will pass this to Ross, our developer, for him to look at.
Did you have some news from Ross?
Thanks
Hi,
thanks for your help!!!
It wasn’t the wpml plugin,
but the custom code (that I was sure it wasn’t in cause)
I had to add the bold section here to make it work
function sf_filter_query_args( $query_args, $sfid ) {
if($sfid==1225){
global $searchandfilter;
$sf_current_query = $searchandfilter->get(1225)->current_query();
$sf_current_query->get_field_string("_sfm_event_archives");
$_sfm_event_archives_array = $sf_current_query->get_array();
$archive_is_check = $_sfm_event_archives_array[_sfm_event_archives][active_terms][0][value];
//print_r($archive_is_check);
if($archive_is_check != '1'){
$args_custom = array(
<strong>"meta_key" => "imic_event_start_dt",
"orderby" => "meta_value_num",
"order" => "ASC",</strong>
"meta_query" => Array (
"event_archives" => Array (
"key" => "event_archives",
"value" => "0"
)
)
);
$query_args = array_merge($query_args, $args_custom);
}
// si aucun filtre d'appliqué
//if($sf_current_query->is_filtered()!=1){}
}
return $query_args;
}
add_filter( 'sf_edit_query_args', 'sf_filter_query_args', 100, 2 );
Thanks again for your help guys!
Really nice plugin!
function sf_filter_query_args( $query_args, $sfid ) {
if($sfid==1225){
global $searchandfilter;
$sf_current_query = $searchandfilter->get(1225)->current_query();
$sf_current_query->get_field_string(“_sfm_event_archives”);
$_sfm_event_archives_array = $sf_current_query->get_array();
$archive_is_check = $_sfm_event_archives_array[_sfm_event_archives][active_terms][0][value];
//print_r($archive_is_check);
if($archive_is_check != ‘1’){
$args_custom = array(
“meta_key” => “imic_event_start_dt”,
“orderby” => “meta_value_num”,
“order” => “ASC”,
“meta_query” => Array (
“event_archives” => Array (
“key” => “event_archives”,
“value” => “0”
)
)
);
$query_args = array_merge($query_args, $args_custom);
}
// si aucun filtre d’appliqué
//if($sf_current_query->is_filtered()!=1){}
}
return $query_args;
}
add_filter( ‘sf_edit_query_args’, ‘sf_filter_query_args’, 100, 2 );
The topic ‘Settings & Default / Post (wrong default order)’ is closed to new replies.
© 2024 Search & Filter Support. All Rights Reserved.
This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
We also use cookies to store items in your cart as well as allowing your to login on the site.
You can adjust all of your cookie settings by navigating the tabs on the left hand side.
By continuing to use this site, you also agree to our Privacy Policy.
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
*Other cookies used for logging in and cart functions will only be used when you use those features and cannot be disabled.
If you disable these cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.
This website uses Google Analytics to collect anonymous information such as the number of visitors to the site, and the most popular pages.
Keeping this cookie enabled helps us to improve our website.
Please enable Strictly Necessary Cookies first so that we can save your preferences!
More information about our Cookie Policy