How to change agents order on the agent list page
Agents are listed by publish date. Most recent are listed first. Change publish date to change order.
To change order in code and make agents go alphabetically, go to agents_list.php
Instead of
$args = array(
'cache_results' => false,
'post_type' => 'estate_agent',
'paged' => $paged,
'posts_per_page' => 10 );
Add 2 more options: orderby and order
$args = array(
'cache_results' => false,
'post_type' => 'estate_agent',
'paged' => $paged,
'posts_per_page' => 10 ,
'orderby' => 'title',
'order' => 'ASC' );
How to change agents order in the agents list shortcode
The order of the shortcode now it defined like this
plugins/wpresidence-core/shortcodes/shortcodes.php
$orderby = 'ID'; 'order' => 'DESC',
This means agents are published by their ID (initial publish date), newest – oldest
If Id is ok, you can simply change DESC into ASC in this code
If you wish to change the orderby to a different variable, you can edit it here