Support » Fixing WordPress » Allow the end user to dynamic chage the sort order of custom post

  • Hi

    I have been googling this for the last couple of hours but am getting nowhere.

    I have a custom post (eg Cars) and on it’s page by default they are displayed using:
    $wp_query = new WP_Query("post_type=cars&orderby=title&order=ASC");

    What I would like to do is allow the end user to dynamically change the sort order using different custom fields, eg by price ASC or DESC, engine size ASC or DESC, etc – from the front end.

    Possibly by a drop down menu like ebay do on their results page, you can sort by: Time: ending soonest, Time: newly listed, Price + P&P: lowest first, etc, etc

  • The topic ‘Allow the end user to dynamic chage the sort order of custom post’ is closed to new replies.