What are Custom Fields?
Custom fields allow a site administrator to ask custom questions of their users when they complete a weight entry. For example, you may want to ask the user “How many cups of water have you drunk today?” or “Did you stick to your diet today?”. From the WP Dashboard, you will see a new option under “Weight Tracker” called “Custom Fields”. From here, you can see a list of all Custom Fields that have been added and have the ability to add, edit and delete them.
As of version 6.1, there are four Field Types currently supported:
- Yes or No – Displays a drop down box allowing the user to select an option of either Yes or No.
- Number Field – Allows the user to enter a number.
- Text Field – Allows the user to enter text.
- Photo Field (Pro Plus only) – Allows the user to upload a photo.
Managing Custom Fields
Custom Fields can be managed from the WP Dashboard by navigating to Weight Tracker > Custom Fields. The initial screen lists the current Customs Fields and summarises what they are called, their slugs, whether they are enabled, etc.
From here, you can delete, add and edit Custom fields.
Viewing the data
Currently there are only shortcodes to render Photo Custom Fields (additional shortcodes will be added in version 7.1+). To render photos the following shortcodes can be used [wlt-photo-count], [wlt-photo-oldest], [wlt-photo-recent] and [wlt-gallery].