• I’m looking to add the ability to sort the search results by address alphabetically, at present the default options are date and price asc/dsc. I can see an array of options in search/orderby.php:

    $results_orderby = apply_filters( 'propertyhive_results_orderby', array(
    			'price-desc' => __( 'Default sorting', 'propertyhive' ),
    			'date'       => __( 'Sort by date added', 'propertyhive' ),
    			'price-asc'      => __( 'Sort by price: low to high', 'propertyhive' ),
    			'price-desc' => __( 'Sort by price: high to low', 'propertyhive' )
    		)

    Is it possible to add my own to this, specifically alphabetically by address?

    Thanks,

    Jonny

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Property Hive

    (@propertyhive)

    Hi Jonny,

    Can you confirm what you mean by ‘address’? Do you mean the title/display address? Or a specific address element (i.e. Town?).

    Thanks,
    Steve

    Thread Starter jcampbell88

    (@jcampbell88)

    Looking to have it sorted by whatever gets output in the item_title hook i.e. what populates <?php the_title(); ?> in the template files, unless we can sort by the individual address elements? In that case it would be the ‘Street’ field.

    Thanks,

    Jonny

    Thread Starter jcampbell88

    (@jcampbell88)

    Sorry, just wanted to give this a bump – is it doable?

    Thanks,

    Jonny

    Plugin Author Property Hive

    (@propertyhive)

    Hi Jonny,

    Sorry for the delay. At the moment ordering by title or address isn’t possible. Though i could add it as a feature request for the next release.

    My question however is, how is this useful to people using the site? What benefit does ordering by street have? In 15+ years working on property sites I’ve never seen this ability so just wondering how this beneficial over other things like price, bedrooms etc.

    Happy to add it, just curious more than anything 🙂

    Steve

    Thread Starter jcampbell88

    (@jcampbell88)

    Morning Steve,

    Thanks for getting back to me. In regards to how useful it is, it was requested by one of my clients – if I’m honest I don’t see the value in it either, I would think that sorting by price, etc. is far more beneficial.

    If you could add this as a feature request I’d really appreciate it, thank you 🙂

    Jonny

    • This reply was modified 8 years, 3 months ago by jcampbell88.
Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Adding additional sorting options to results pgae’ is closed to new replies.