Custom Fields are one of the primary features to unlocking WordPress's power. So if you want to build custom, dynamic WordPress sites, it's essential to understand how custom fields work. Custom Fields let you store additional information about your blog posts, pages, portfolio, or even custom post types. In a nutshell, Custom Fields make it possible to use WordPress as a powerful content management system.
With Uncode, you can even take the information from your Custom Fields and dynamically include it in your Uncode designs and Page Builder dynamic templates. For example, you could add a Custom Field for each piece of information so that you can quickly enter it in the backend editor and then automatically display it on the front-end of your site according to your template.
To better understand what Custom Fields are for, let's take into consideration some scenarios:
- Event: use Custom Fields to display lists of participating artists, dates, and must-see performances, etc.
- Ecommerce: use Custom Fields to display additional metadata associated with your products.
- Real Estate: use to display information such as location, square footage, number of rooms, etc.
- Restaurant: use to create a menu with fields as the dish's price, any relevant dietary concerns, calories, etc.
How to display Custom Fields on a page
To display a Custom Field on a post, page, portfolio, or product on your site, please follow:
- Navigate to the Theme Options → Post (Page, Portfolio or Product).
- Create a new Custom Field and Save, screenshot.
- Navigate to a single Post (Page, Portfolio or Product) and insert a value for the Custom Field in the Page Options, screenshot.
- Insert the Custom Fields module within your page, and adjust the various options, screenshot.
Custom Fields modes
The Custom Fields module can be configured with various methods so that each user can benefit from it based on its own scenario. The main modes are:
- List: labels and values are printed as a simple list text (for example, it is perfect to list characteristics of a product or of an apartment). To use this mode, select the correct option for the 'Post Type' option.
- Single List: print a specific custom field, including label and value. To use this mode, select the correct option for the 'Post Type' option and the desired value for the 'Custom Fields' option.
- Single value: print a single specific label or a single specific value of one particular Custom Field. Associated with the options of the 'Typography' tab, this is the most creative solution because it allows you to position labels or values in any position of the page, and with any typography (for example, it is perfect to create a dynamic title for the custom field). To use this mode, select the correct option for the 'Post Type' option, the desired value for the 'Custom Fields' option, and the 'Element' to display.