Problems with sorting options
Hello, i'm having problems trying to show our ads sorted by date of expiration order:
We have the loop-ad_listing.php with the following:
<?php
if (!is_search()) {
$args = array(
'post_type'=> 'ad_listing',
'orderby' => 'meta_value',
'meta_key' => 'cp_sys_expire_date',
'order' => 'ASC'
);
query_posts( $args );
}
?>
But ads are not displaying correctly by expiration date when they are listed after a search through our selector search system.
our website is
www.cazalastmoment.com and an you can see an example of what i'm talking about here:
http://www.cazalastmoment.com/?s='%2...search&scat=25
It's in spanish but as you can see ads are listed by publishing order, not ordered by expiration date.
We are not able to resolve the problem and make it work properly, we have also installed the
wp custom search plugin.
Thanks in advance!