Support » Plugin: WP Car Manager » List the cars after publication date?

  • Resolved hjartstrom

    (@hjartstrom)


    Hi,
    Is it possible to list the cars after the publication date. (So that the newest cars always come first!)

    Thanks,
    Jimmie

Viewing 6 replies - 1 through 6 (of 6 total)
  • Would be nice if we have such setting in the backend. Your users can set the filter to display new vehicle listings first in the front-end. The order of the listings is probably hardcoded somewhere in the code of the cpt.

    I found the code in the source but please note changes you make will be overwritten by plugin updates!

    wp-car-manager/src/Shortcode/Cars.php

    on line 47:
    'sort' => 'price-asc',

    Goodluck!

    • This reply was modified 3 years, 2 months ago by Patrick.

    You can change it to:

    'sort' => 'date-desc',

    Thanks @zaanmedia!
    It works great!

    You don’t have to edit the php codes. Just add it to the shortcode like the following;

    [wpcm_cars sort='date-desc']

    This is not stated in the documentation? So is it working for real? I will check this later on to see if this is working never tried because it was not stated in the documentation that the option would work.

    I tried it and it is working 😉

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘List the cars after publication date?’ is closed to new replies.