WP Residence Help WP Residence Help

  • WpEstate
  • How to Build Your Website
  • Video Tutorials
  • Client Support
  • API
Home / FAQ, Technical: Custom Order / Technical: How to change agents order

Technical: How to change agents order

4447 views 0

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
FAQTechnical: Custom Order

Related Articles

  • Error on Single Property Page: Call to undefined function wpestate_return_property_address()
  • Create custom Login/Register buttons in elementor
  • How to change the login icon on mobile.
  • Core Plugin deactivates when another theme, different than WpResidence is activated

WP Residence Documentation

  • 1. General
    • How to Get Support
    • Get your buyer license code.
    • Use SSL / https
    • Server / Theme Requirements
  • 2. Installation
  • 3. Installation FAQ
  • 4. Advanced Search
    • Advanced Search Display Settings
    • Advanced Search Form
    • Geolocation Search for Half Map
    • Save Search Theme Options
    • Advanced Search Colors
  • 5. Agent, Agency & Developers
  • 6. Property Page
  • 7. Properties List
  • 8. Property Taxonomies
  • WpResidence Elementor Studio
  • 10. Blog Posts & Blog List
  • 11. Shortcodes
    • Contact Form
    • Featured Agency/Developer
    • Membership Packages
    • Testimonials
    • Google Map with Property Marker
    • Listings per Agent, Agency or Developer
    • Display Categories
    • Agent List
    • Recent Items Slider
    • Recent items
    • List Properties or Articles by ID
    • Featured Agent
    • Featured Article
    • Featured Property
    • Login & Register Form
    • Icon Content Box Shortcode
  • 12. Widgets
  • Theme Options
    • General Settings
    • User Types Settings
    • Appearance
    • Logos & Favicon
    • Header
    • Footer Style and Colors
    • Price & Currency
    • Property Custom Fields
    • Features & Amenities
    • Listing Labels
    • Theme Slider
    • Permalinks
    • Splash Page
    • Social & Contact
    • Map Settings
    • Pin Management
    • How read from file works
    • General Design Settings
    • Custom Colors Settings
    • Header Design & Colors
    • Mobile Menu Colors
    • User Dashboard Colors
    • Print PDF Design
    • Property, Agent, Blog Lists Design Settings
    • Sidebar Widget Design
    • Font management
    • How to add custom CSS
    • Custom Property Card Unit – Beta version
    • Email Management
    • Import & Export theme options
    • reCaptcha settings
    • YELP API Integration
    • iHomefinder Optima Express IDX
    • MEMBERSHIP & PAYMENT Settings
    • Property Submission Page
    • PayPal Setup
    • Stripe Setup
    • Wire Transfer Payment Method
  • Translation
  • FAQ
  • Pages
  • Header
  • Footer
  • Google or Open Street Maps
  • Payment Options
  • Plugins
    • Included Plugins
    • Third Party Plugins – IDX Compatibility
    • Third Party Plugins – Multi Languages
    • Third party Plugins – Other
  • Technical
    • Technical how to | Custom Code Required
    • Technical: Child Theme

Join Us On

Powered by WP Estate - All Rights Reserved
  • WpEstate
  • How to Build Your Website
  • Video Tutorials
  • Client Support
  • API