Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter hockeyhero4

    (@hockeyhero4)

    Go figure I’ve spent 3 days on this and then once I post it in the forums I figure it out:

    So, I figured out that you can change the sort by locating this file: agentpress-listings/includes/class-property-search-widget.php.

    Within this file is a line:

    $terms = get_terms( $tax, array( 'orderby' => 'count', 'order' => 'DESCEND', 'number' => 100, 'hierarchical' => false ) );

    I changed it to this:

    $terms = get_terms( $tax, array( 'orderby' => 'name', 'order' => 'ASC', 'number' => 100, 'hierarchical' => false ) );

    This fixed my bedroom issue but caused another one to arise. Now my custom taxonomies of “Square Footage” and “Price” were showing out of order.

    THE END ALL FIX TO EVERY PROBLEM was this:
    $terms = get_terms( $tax, array( 'orderby' => 'id', 'order' => 'ASC', 'number' => 100, 'hierarchical' => false ) );

    I had to order it by ID; not by count and not be name. Hopefully this helps anyone else out there that ran into these same issues.

    Thanks hockeyhero4 – I had been searching for this for a while and this fixed the same problem for me.

    Thread Starter hockeyhero4

    (@hockeyhero4)

    Very happy that it helped you, too!

    How would you sort the listings or choose which listings get pulled for the featured listing widget?

    Thread Starter hockeyhero4

    (@hockeyhero4)

    That should be under DIRECTORYPRESS >> DISPLAY SETTINGS >> HOMEPAGE.

    PremiumPress has a support website for questionsl ike yours Sheila

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Sorting the widget taxonomies’ is closed to new replies.