Empty Field Display #
PetMatchPro 8.4 introduces a unified way to control how empty (null, blank, or unknown) animal fields are displayed. You can either show every configured field with a Not Defined placeholder (the long-standing default), or hide empty fields entirely to tighten the layout. The setting is available as an admin checkbox, a shortcode parameter, or both.
Default Behavior #
Out of the box, every configured field renders on every animal. When the underlying shelter record has no value for a field, PetMatchPro substitutes the Not Defined placeholder so the card or detail layout stays consistent from animal to animal. This is the behavior every release prior to 8.4 used.
Hiding Empty Fields #
There are two ways to hide empty fields:
1. Admin Checkbox (per method type) #
- Go to PetMatchPro > General > Display Options.
- Locate the Hide Empty Fields checkbox group.
- Tick the checkbox for each method type (adopt, lost, found, list, preferred) where you want empty fields dropped.
- Save.
The admin checkbox applies to every page that renders that method type, across all templates (search, detail, poster).
2. Shortcode Parameter (per page) #
The hide_empty parameter overrides the admin checkbox for the specific shortcode instance:
[pmp-search type="adopt" hide_empty="true"]
[pmp-details hide_empty="true"]
Use hide_empty="false" to force empty fields to render as Not Defined even when the admin checkbox is ticked:
[pmp-search type="adopt" hide_empty="false"]
[pmp-details hide_empty="false"]
The hide_empty shortcode parameter is a Junior-tier feature. On the Basic (free) tier the parameter is silently stripped and only the admin checkbox is honored.
What Counts as Empty? #
The following field values are treated as empty:
nullor missing keys- Empty strings and whitespace-only strings
- Empty arrays from the API response
- The
Not Definedsentinel (so upstream placeholders are also caught) - The empty-date sentinel used for unset date fields
Zero as Empty (Weight Fields) #
Shelter management systems frequently use 0 as a data-entry placeholder on physical-measurement fields, meaning “not recorded” rather than “literally zero”. PetMatchPro 8.4 treats a zero value on specific fields as empty:
- PetPoint —
bodyweight - AnimalsFirst —
weight - RescueGroups — no weight field is exposed by the API, so the list is currently empty
Currency fields (fee, adoptionfee, price, cost, amount) are intentionally not treated this way — a $0 adoption fee is a legitimate value and will render as $0.00.
Where the Rule Applies #
Every field display location in the plugin honors the hide_empty setting consistently:
- All search result templates (adopt, lost, found, list, featured, celebration, compact, carousel, structured, universal)
- All detail templates (profile, navigation, similar, wide, cpa)
- Poster body field loops
- Related-animal grids inside detail templates with the
-similarsuffix (they inherit the parent detail's method setting)
The only exception is poster header and footer zones — the heading, main photo, call-to-action, and QR code always render on lost/found flyers regardless of the toggle. This protects the printable layout.
Priority Order #
When resolving whether to hide empty fields for a given render, PetMatchPro uses this priority chain:
- Shortcode parameter —
hide_emptyon the specific[pmp-search]or[pmp-details]instance (Junior+). - Admin checkbox — the per-method setting on General > Display Options.
- Default — off (show empty fields as Not Defined).
The first non-null value wins, so a shortcode hide_empty="false" will override an admin checkbox that is ticked on for that method type.
Common Questions #
Why is weight showing “Not Defined” for every animal? #
Your shelter system is probably storing 0 as a placeholder on records where no weight was recorded. Since PetMatchPro 8.4 treats weight=0 as empty, those rows will display Not Defined when the hide-empty toggle is off, or be dropped when it's on. The fix is at the data-entry level: record real weights in your shelter system. Or, if you prefer the field never appear, use hide_empty="true" on that page.
I ticked the admin checkbox but nothing changed. #
Check three things:
- Verify you ticked the box for the correct method type — there is one checkbox per method (adopt, lost, found, list, preferred).
- Make sure the page you're testing doesn't have a shortcode
hide_empty="false"on it, which would override the admin setting. - Clear any page / object cache between the admin save and your test reload.
I added hide_empty="true" to my shortcode but fields still show as Not Defined. #
The hide_empty parameter is Junior-tier. On the Basic (free) tier the parameter is silently stripped from the shortcode and only the admin checkbox applies. Upgrade to Junior or higher, or use the admin checkbox instead.
Why does my lost/found flyer still show the animal photo and heading when hide_empty is on? #
Poster header and footer zones are intentionally exempt from the toggle — a flyer without a photo or heading isn't useful. Only the poster body field loop honors the setting.
Related Articles #
- [pmp-search] Reference — All search shortcode parameters
- [pmp-details] Reference — All detail shortcode parameters
- Parameters by License Tier — Which parameters unlock at each tier