Fields Manager

Adds your own fields to the location editor without writing any code, and controls where they appear on the front end.

Adding your own fields used to mean writing a wpsl_meta_box_fields filter in a child theme. The filter still works — this section does the same thing without any code.

Groups
Fields live inside groups, so you have to create a group before you can create a field. A group is a labelled block in the location editor: Accessibility, Services, Franchise details.

Manage Groups opens the group list, where + Add Group creates one and the name is the heading shown in the editor.

Removing a group deletes every field inside it, and the data stored in those fields. There is no undo. Move fields to another group first if you only meant to reorganize.

Fields
+ Add Field adds a row to the selected group. Each field has:

  • Label — what the person editing a location sees.
  • Name — the key the value is stored and retrieved under. Use lowercase and underscores, and settle it before you start entering data: changing the name later orphans everything already saved against the old one.
  • Type — Text, Textarea, Email, Tel, URL, Checkbox or Dropdown.

Section Editor

A custom field does not appear on the front end until something renders it. The Section Editor is where you attach it to a template section.

It edits the markup of one section at a time. Pick the Template and then the Section — List, Info window, Number of results or Online stores — press Load, and the current markup appears in the editor.

Create Field Code — generates the snippet for one of your custom fields, so you do not have to remember the template syntax.

Activate this custom template section — switches the front end from the default markup to yours. Until you tick it, you are editing a draft and nothing changes for visitors.

Restore Default — puts the original markup back.

Online stores — only offered when the option to include online stores is enabled in the Store Editor section, because it is the same condition the front end collects that data on.

Edit one section, activate it, and check the front end before moving to the next. A mistake in a section’s markup shows up on every result that uses it.

Related