Change Default Option in `Sort by Default`

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.

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

Comments

Article is closed for comments.