How to change the listings slug in AgentPress Listing Plugin?

I’m also looking to change the name of the “listings” slug. Is this possible with this plugin? Currently my listing slug is site.com/listings and I’d like it to be site.com/properties-for-sale.

Very easy way you can change the slug for your listings. AgentPress Listings Plugin has a filter agentpress_listings_post_type_args. Using this you can change the any element of “listings” post type.

Step 1: Add this small script in your functions.php file

add_filter( 'agentpress_listings_post_type_args', 'gd_listing_custom_slug' );
function gd_listing_custom_slug( $args) {

  $args['rewrite'] = array('slug' => 'properties-for-sale' );  
  return $args;
   
}

Step 2: Flush your permalink structure.

  • Navigate to Dashboard > Settings > Permalink page
  • Click on “Save Changes” button

Now refresh your website and click on “view listing” button or “listings title”. You will get the new slug for your listings.

This site uses cookies to offer you a better browsing experience. By browsing this website, you agree to our use of cookies.