• By default, the ads are supposed to be ordered from newest to oldest, but no matter what I do, the ads are displaying from oldest to newest. I’ve tried the “order_by” parameter on the shortcode, but it’s ignored.
    Any ideas?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    there might be some global filter run on the WP_Query that forces the order from oldest to newest, in most cases you should be able to disable the global filter by adding the code below in your theme functions.php file

    
    add_filter( "adverts_list_query", function( $args ) {
      $args["suppress_filters"] = true;
      return $args;
    }, 1000 );
    

    If this will not help, you can try disabling one by one the plugins you have active and see if and when the problems go away (this will at least allow pinpointing the conflicting code).

    BTW. The sorting order you can set directly in the [adverts_list] shortcode, please edit your page with [adverts_list] and make sure it is not using the order_by param or if it is using it, the value is not set to date-asc (that is not like this [adverts_list ... order_by="date-asc"]).

Viewing 1 replies (of 1 total)
  • The topic ‘Ads ordering oldest to newest’ is closed to new replies.