How To Display Custom Post Fields In the Post Details Page

Link: https://support.brilliantdirectories.com/support/solutions/articles/12000078806

This article explains how to display custom post field values on the post details page.



Custom post fields can be added to a post form and displayed on the front-end post details page using the Post Meta Details widget.


Overview

When a custom field is added to a post form, the field can collect additional information from members when they create or edit a post.


The widget used for displaying post field details is:


Bootstrap Theme - Module - Post Meta Details v2.0


To display that custom field value on the post details page, the field must be set to display on the view page, and the correct widget must be added to the post details layout.





Step 1: Customize the Post Form

Start by editing the form used by the post type.

  1. Go to Toolbox >> Form Manager.
  2. Find the form connected to the post type.
  3. Click Customize if the form has not been customized yet.
  4. Click Edit if the form has already been customized.


The form editor will open so custom fields can be added or updated.



Step 2: Add the Custom Post Field

Add the custom field that should display on the post details page.


Examples of custom post fields include:

  • Event location
  • Price
  • Service area
  • Start date
  • Requirements
  • Contact instructions
  • Download link






After adding the field, review the field label, database variable, field type, and required field settings.


Step 3: Enable Display View for the Field

For the custom field value to display on the post details page, Display View must be enabled for the field.

  1. Open the custom field settings.
  2. Find the Display Settings for the field.
  3. Enable Display View.
  4. Save the form changes.





Important: If Display View is not enabled, the field value may be saved with the post but will not display on the post details page.


Step 4: Add the Post Meta Details Widget to the Sidebar

The custom post field values can be displayed in the sidebar of the post details page by adding the Post Meta Details widget to the post sidebar.

  1. Go to Toolbox >> Sidebar Manager.
  2. Find the Post Single Page sidebar.
  3. Click Customize if the sidebar has not been customized yet.
  4. Click Edit if the sidebar has already been customized.
  5. Find the widget named Bootstrap Theme - Module - Post Meta Details v2.0.
  6. Drag and drop the widget into the sidebar layout.
  7. Click Save Changes.




The custom post field values will display in the sidebar when viewing the post details page.


Alternative: Add the Widget to the Post Details Content

The Post Meta Details widget can also be added directly inside the post details page layout using the widget shortcode.



Use the following shortcode:

[widget=Bootstrap Theme - Module - Post Meta Details v2.0]



When this shortcode is added to the post details layout, the custom field values can display below the main body of the post instead of in the sidebar.





Where the Custom Field Values Display

Custom post field values can display in different areas depending on where the widget is added.


LocationSetupResult
Post sidebarAdd the widget to the Post Single Page sidebar.Custom post fields display in the sidebar of the post details page.
Post details content areaAdd the widget shortcode to the post details layout.Custom post fields display below the main post content.



Important Notes

  • The custom field must be added to the correct post form.
  • Display View must be enabled for the field.
  • The post must have a saved value for the custom field before it can display on the post details page.
  • The Bootstrap Theme - Module - Post Meta Details v2.0 widget must be added to the sidebar or post details layout.
  • If the field is blank for a post, there may be no value to display.
  • Custom fields may display differently depending on the field type and the post details page layout.

Common Reasons the Field Does Not Display

  • Display View is not enabled: Open the field settings and enable Display View.
  • The wrong form was edited: Confirm the custom field was added to the form used by the correct post type.
  • The widget was not added: Add Bootstrap Theme - Module - Post Meta Details v2.0 to the sidebar or post details layout.
  • The post field is empty: Edit the post and add a value to the custom field.
  • The sidebar is not assigned: Confirm the correct sidebar is being used by the post details page.