This template enables you to display your listings without the need to use the AgentPress Pro Listings plugin or the AgentPress Pro theme.
You can use this template in any Genesis child theme, in this case, the Genesis Sample child theme is used.
Entries are displayed in responsive grid with equal height regardless of the image size. Custom field data for property details is displayed inline using CSS to evenly space values on the left with the price on the right.
The code adds these fields on the single edit listing screen :
The template enables you to add more or customize/modify property details using the custom field code.
Shows the Listing archive page displaying entries with custom field data for beds, baths, size and price along with the featured image and listing title. Also displays and links to the taxonomy term archive for property locations.
Tested using the Genesis Sample child theme by StudioPress.
There’s 4 steps :
- # Upload the file named archive-listing.php to your theme folder like this
- # Copy & paste the PHP code ( without the opening PHP tag ) from the functions.php file to the end of your child themes functions file and re-save permalinks.
- # Copy & paste the CSS from the style.css file to the end of your child themes style sheet and clear caching.
- # Install the ACF plugin ( free or premium version ), go to Custom Fields > Tools > Import and import the file named acf-73043.json.
WordPress Custom Fields
If you prefer not to use a custom fields plugin, you can use the custom fields native to WordPress.
Fields names you need to create are seen in the following image :Book Consultation