Custom CPT Archive Template For Listings & Custom Fields In Genesis Sample

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 :

Single Listing custom fields

The template enables you to add more or customize/modify property details using the custom field code.

Demo Video

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.

Installation Steps

There’s 4 steps :

  1. # Upload the file named archive-listing.php to your theme folder like this
  2.  

    Step 1

  3. # 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.
  4.  
    Step 2

  5. # Copy & paste the CSS from the style.css file to the end of your child themes style sheet and clear caching.
  6.  
    Step 3

  7. # Install the ACF plugin ( free or premium version ), go to Custom Fields > Tools > Import and import the file named acf-73043.json.
  8.  
    Step 4

Download Folder

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 :

Custom Fields Names for Property Listings

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.