The USP Helper plugin makes it easy to display Custom Fields in submitted posts. Works to display Custom Fields on the frontend, backend, or both. The USP Helper plugin is available as a FREE download if you have purchased USP Pro.
To get started with USP Helper, follow these steps:
- Download, install, and activate USP Helper addon
- Visit the plugin settings to add your Custom Fields and configure your options
- Done! USP Helper will display the specified Custom Fields automatically
The USP Helper plugin supports the following types of Custom Fields: text, images, audio, video, array values, and just about anything else you can throw at it :)
Right up front, the plugin provides a place to enter the names of your Custom Fields:
Here you can enter the names of any Custom Fields that should be displayed on the front-end of your site. Each field may be customized with markup that should be included before and after the contents of the Custom Field. To add more Custom Fields, click the “Add Another” link. Or to remove any Custom Field, click its adjacent “x” button.
Next, the Helper plugin provides some General Settings:
These settings enable you to customize when and where your Custom Fields are displayed.
- Display Custom Fields on frontend — check to enable display of Custom Fields on the frontend of your site
- Display Custom Fields on backend — check to enable display of Custom Fields on the backend of your site
- Display Custom Fields after post content — check the box to display the Custom Fields after post content; or leave the box unchecked to display the Custom Fields before post content
- Limit display of Custom Fields to single Posts and Pages — check this box to display the Custom Fields only on single Posts and Pages; or leave this box unchecked to display the Custom Fields everywhere (e.g., homepage, archives, etc.)
- Limit display of Custom Fields to submitted Posts and Pages — check this box to display the Custom Fields only on submitted Posts and Pages; or leave the box unchecked to display the Custom Fields on all Posts and Pages
- Load Video Scripts & Styles — check this box to load the required scripts & styles to display video; or leave unchecked if you are not displaying any video Custom Fields
Lastly, the plugin provides two settings where you can define any HTML/markup that should be displayed before and/or after all of the displayed Custom Fields:
Getting Custom Field Names
Wondering where to get the names of your Custom Fields? Here is a screenshot that shows where to find them:
Shown here is the Custom Fields meta box, which is available beneath the Post Content field on the “Edit Post” screen of any WP Post. So to get the names of your Custom Fields, submit a test post and then view it on the Edit Post screen. There you can enable display of the “Custom Fields” meta box by clicking the Screen Options tab, located in the upper-right corner of the screen.
Custom Fields with multiple values
For Custom Fields with multiple values (i.e., arrays), add
%%n in the plugin settings after the Custom Field Name. For example, if our Custom Field is from a checkbox field that enables users to select up to four items, we can display the multiple values by configuring the fields like so:
When using this method, be sure to define fields for the total number of possible values. So if your field lets the user pick up to seven items, then you should define seven Custom Fields using the
%%n syntax (i.e., define fields from
The Helper plugin supports nested shortcodes. So for example if you want to use WordPress’ audio shortcode,
[audio], you can “nest” it in the Helper plugin, like so:
And the audio will be played automatically on the frontend. Remember to change the
usp-file-1 to match the name of the custom field that is used for the uploaded audio file.
How does it work?
This configuration is the same as adding this shortcode:
Normally WordPress would not understand
usp-file-1, but the Helper plugin translates it, so what WordPress “sees” is this:
And that is something that WordPress understands. So the end result is that the submitted audio file will be displayed in the post content. Bada boom.
Nested Custom Fields
The Helper Plugin also enables nested custom fields. A good example of this would be a linked image. Say you have two custom fields on your form. The first custom field collects a link to something, like a website. The second custom field collects a URL for an image. These two custom fields can be used together to create a linked image, for example the output might look like this:
<p><a href="http://example.com/"><img src="http://example.com/images/whatever.jpg" alt=""></a></p>
To achieve this using the Helper plugin, you can use the [usp_meta] shortcode. Here are the steps:
- Each row in the Helper Plugin has three input boxes. In the first box, add this:
<p><a href="[usp_meta meta='usp-file-1']"><img src="
- Then in the middle helper box, add this:
- Lastly, in the third helper box, add:
Note that single quotes must be used for the
meta attribute on the
[usp_meta] shortcode. Also, you will need to edit the
usp-file-1 to match the name of the actual custom field being used.
Here are some important things to be aware of when using USP Helper.
- USP Helper displays Custom Fields from any posts submitted via USP Pro or the free version of USP
- The setting to “Limit to submitted posts” checks for a Custom Field named
- To reset plugin settings to their default values, deactivate and uninstall (delete) the plugin, then re-install and reactivate
- To display video, add
[usp_video]before the Custom Field, and
[/usp_video]after the Custom Field
- To disable video display on any Post or Page, add a Custom Field to the post named
usp-no-videowith a value of
- When the “Display on backend” setting is enabled, the plugin will attach a Custom Field named
usp-added-to-contentto each submitted post; so you can remove that field to re-add that post’s Custom Fields
- When both settings “Display on frontend” and “Display on backend” are enabled, the custom fields will be displayed twice on the frontend. To prevent this, you can do one of two things:
- Disable the setting “Display on frontend” (automatic method, recommended)
- Or enable the setting, “Limit display of Custom Fields to submitted Posts and Pages”, and then delete the
is_submissionCustom Field from each post (manual method, just FYI)
USP Helper includes the following filter hooks for advanced customization:
usp_helper_settings_default usp_helper_display_frontend usp_helper_display_backend usp_helper_video_attributes usp_helper_video_markup
Purchase of USP Pro required to download USP Helper. If you own a copy of USP Pro, you can log in and revisit this page to download the plugin for free. Or, if you don’t own a copy of USP Pro, you can learn more and visit the Store »
Note: this version of USP Helper replaces the previous task-specific versions (e.g., Video Helper, Multiple Fields, Add to Post Content, et al).
For advanced control over the display of your Custom Fields, check out these tutorials: