1. Home
  2. Docs
  3. GeoDirectory Pages and Templates
  4. Archive Item Template

Archive Item Template



Introduction
Troubleshooting
Frequently Asked Questions
Support

Introduction

What

The Archive Item page template is a WordPress page that controls what shows up in the ‘mini listings’ shown throughout the site.. The contents of the page are the GeoDirectory Elements that are used to display listing data for each listing. Inside the template you will find default Elements that are installed with GD including GD Post Images, GD Output Location and more. Each of these Elements is responsible for showing one specific feature.

Every time GD Listings or GD Loop is used, the contents of the GD Archive Item template are queried, and each Element is rendered with the data of the listing at the URL being viewed.

Where

The GD Archive Item template is a WordPress page that is installed with GeoDirectory.
You can find the page by searching in the the Pages on your site in:

WordPress Backend – Pages – Search “gd” – hover over the Archive Item page and click edit to edit the page.

Examples

Directory Starter – https://wpgeo.directory/starter/places/
Supreme Directory – https://wpgeo.directory/supreme-directory/places/

DIrectory Starter Archive Item on Archive page for Places CPT.

GD Design Elements used in this Archive Item template shown above

GD Post Images
GD Post Title
GD Post Favorite
GD Post Content
GD Post Badge

GeoDirectory Settings

Default Template Setting

Choose the default GD Details template in the Pages settings:

GeoDirectory – Settings – General – Pages – Detail template – Choose your template page

Custom Post Types Template Override

When using the Custom Post Type addon, it is possible to set a different Archive Item template for each Custom Post Type (CPT). The setting for this is found in:

CPT Settings (ex. Places Settings) – General (tab) – Show Advanced – Archive Item template – Choose your template page

Personalize

GeoDirectory Design Elements

The following GD Elements are commonly used on the Archive Item template

GD Post Images – Display a single image or a slider
GD Post Title – Display the listing title as a link to the listing
GD Post Favorite – Display a link so visitors can add the listing to their list of favorites.
GD Post Content – Display the listing Description and set a max word count and design an optional ‘read more’ link.
GD Post Badge – New (last 30 days), Featured, Verified (is_claimed), Twitter, Facebook, and Website.
GD Output Location – Listings – Easily display a list of custom fields in your archive item with a single Element by using the Custom Fields Settings.
GD Post Meta – Display custom fields, categories, or tags.
GD Archive Item Open and Close – Simple containers to design your archive item into one or more rows and columns. Helps make listings look good in list view and grid layouts.

Default Content

When GeoDirectory is installed, the template is installed with default content. If you make changes to the page, and want to restore the default content, you can find it in the GeoDirectory Settings:

GeoDirectory – Settings – General – Pages – Click “Default Content”

The default content will be shown in a lightbox modal. You can copy and paste the default content back into the Page, overwriting anything you already have in the page.

More Design Options

GD Output Location -> Listings

You can adjust the properties of listing Custom Fields in the CPT Custom Fields Settings as described here.

One of the options is to “Show in extra output locations“.

Once you have chosen to display fields in the ‘Listings’ location, you will need to use the GD Output Location element in your Archive Item template to show those fields. Add the widget or shortcode to your Archive Item template and set it to display the “Listings” location.

[gd_output_location location="listing"]

Builders

You can use a builder on the Archive Item template. See more information here on the builders doc.

Customize

Customize with PHP Templates

You can create the Archive Item template with PHP. See our page here to get started.

Articles

Was this article helpful to you? Yes No