Skip to content

Instantly share code, notes, and snippets.

@nickcernis
Created December 15, 2014 12:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nickcernis/28bd44e0402825b0d452 to your computer and use it in GitHub Desktop.
Save nickcernis/28bd44e0402825b0d452 to your computer and use it in GitHub Desktop.
Change the Property Details labels in the AgentPress Pro theme
<?php // Remove the opening PHP tag before pasting to functions.php
add_filter( 'agentpress_property_details', 'custom_agentpress_property_details_filter' );
// Filter the property details array for property listings
// Replace labels such as "ZIP" with "Postcode" etc.
function custom_agentpress_property_details_filter( $details ) {
$details['col1'] = array(
__( 'Price:', 'apl' ) => '_listing_price',
__( 'Address:', 'apl' ) => '_listing_address',
__( 'City:', 'apl' ) => '_listing_city',
__( 'State:', 'apl' ) => '_listing_state',
__( 'ZIP:', 'apl' ) => '_listing_zip'
);
$details['col2'] = array(
__( 'MLS #:', 'apl' ) => '_listing_mls',
__( 'Square Feet:', 'apl' ) => '_listing_sqft',
__( 'Bedrooms:', 'apl' ) => '_listing_bedrooms',
__( 'Bathrooms:', 'apl' ) => '_listing_bathrooms',
__( 'Basement:', 'apl' ) => '_listing_basement'
);
return $details;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment