Skip to main content

Fields & Default Content

2 min readApplies to every PremiumPress theme · 12.x

Walkthrough comingA short screen recording of this guide is planned. The written steps below are complete.

Fields & Default Content

The data your listings hold, and the fields people fill in.

Four separate field sets control different parts of the site. They are edited on different screens, and mixing them up is the usual source of "I changed it and nothing happened".

WhatWhereControls
Custom fieldsPremiumPress ▸ Custom Fields (ppt_fields)What people fill in when adding a listing, and what shows on the listing page.
Search fieldsPremiumPress ▸ Search (ppt_search)The filters on the search and category pages.
TaxonomiesPremiumPress ▸ Taxonomies (ppt_categories)Categories and other ways listings are grouped.
Registration fieldsPremiumPress ▸ Users (ppt_users)Extra fields on the sign-up form.

Custom fields​

Custom fields are the heart of it. Each field you define is stored against the listing and read back by the listing template — so adding a field is all it takes for it to appear on the listing page.

Fields are defined once and used in both places a listing can be edited: the admin editor, and the member's own edit screen in their account area. Some fields can be marked edit only, meaning administrators see them but members do not.

Your product ships with a field set appropriate to it — a car dealer theme starts with make, model and mileage; a property theme with bedrooms and floor area. Change, add to, or remove them freely.

Search fields​

Search filters are configured separately, because what you want to store and what you want to filter by are rarely the same list. A field with dozens of possible values may be worth showing on the listing page but useless as a filter.

Set up a custom field first, then add the matching filter under Search.

Taxonomies​

Categories are the main taxonomy, and are seeded during setup based on the product you installed. Add your own from the Taxonomies screen.

Seeded category names are created in whatever language was active at setup, and are ordinary database records afterwards. Renaming them is a normal edit; they are not re-translated if you change the site language later. See Languages & Text.

Location fields​

Where a listing is — the address, and the position used for map and distance-based search — is handled by the location fields, seeded with a starting set of countries and regions during setup.

Where the detail lives​

The exact classes behind each of these are catalogued under Admin screens and Shared platform.