Change Default Option in `Sort by Default`

Zack Katz -

To change Sort by Default, add the following in your theme's `functions.php` file:

add_filter('idx_plus_default_sortby', 'customize_idx_plus_default_sortby');
function customize_idx_plus_default_sortby($default = 'DateAdded') {
// Choose from DateAdded, Price, OverallPriceDropPercent, LastUpdated, WalkScore, ImprovedSqFt, LotSqFt
	return 'Price';

add_filter('idx_plus_default_sortorder', 'customize_idx_plus_default_sortorder');
function customize_idx_plus_default_sortorder($default = 'DESC') {
// Use either 'ASC' or 'DESC'
	return 'ASC';

You can also download and install the attached plugin. You can modify the file to update to code.

Have more questions? Submit a request


Article is closed for comments.