Results 1 to 2 of 2

Thread: Sort / order ads by custom fields

  1. #1
    Thread Starter
    Newbie soerenbj's Avatar
    Join Date
    Jun 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Sort / order ads by custom fields

    Hi !

    I think it is a crucial mistake by appthemes that there is no ordering/sorting on top of the ad-lists! Users scould be able to order by custom fileds like cp_price both ASC and DESC.

    I did though find a way to change the order according to cp_price by editing the file "taxonomy-ad_cat.php". I edited this line:

    query_posts( array('post_type' => APP_POST_TYPE, APP_TAX_CAT => $term->slug, 'ignore_sticky_posts' => 1, 'paged' => $paged) );

    INTO THIS:

    query_posts( array('post_type' => APP_POST_TYPE, 'ignore_sticky_posts' => 1, 'paged' => $paged, 'orderby' => 'meta_value', 'meta_key' => 'cp_price', 'order' => 'ASC')
    __________________________________________________ ____________________________
    The frontpage listings are not effected by this act, but can be ordered /sorted by using the plugin called "smart sort" from DyasonHat, and you no code changes is needed.

    /Søren

  2. #2
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    37,986
    Thanks
    161
    Thanked 3,123 Times in 2,997 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Sort / Order by price and post date for classipress 3.1
    By anthonyaj in forum ClassiPress General Discussion
    Replies: 11
    Last Post: September 19th, 2013, 04:59 PM
  2. Replies: 18
    Last Post: October 9th, 2011, 11:24 PM
  3. [SOLVED] Custom field order in frontend doesn't match with custom field order set in backend
    By bluecafe in forum Report ClassiPress Bugs
    Replies: 11
    Last Post: November 24th, 2010, 08:47 AM
  4. Custom Fields Form Order
    By gomeetpete in forum Help Using ClassiPress
    Replies: 2
    Last Post: April 5th, 2010, 12:24 PM