Forums

Allow the end user to dynamic chage the sort order of custom post (1 post)

  1. cucocreative
    Member
    Posted 3 months ago #

    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

Reply

You must log in to post.

About this Topic