[fusion_builder_container hundred_percent=”no” hundred_percent_height=”no” hundred_percent_height_scroll=”no” hundred_percent_height_center_content=”yes” equal_height_columns=”no” menu_anchor=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” status=”published” publish_date=”” class=”” id=”” background_color=”” background_image=”” background_position=”center center” background_repeat=”no-repeat” fade=”no” background_parallax=”none” enable_mobile=”no” parallax_speed=”0.3″ video_mp4=”” video_webm=”” video_ogv=”” video_url=”” video_aspect_ratio=”16:9″ video_loop=”yes” video_mute=”yes” video_preview_image=”” border_size=”” border_color=”” border_style=”solid” margin_top=”” margin_bottom=”” padding_top=”” padding_right=”” padding_bottom=”” padding_left=””][fusion_builder_row][fusion_builder_column type=”1_1″ layout=”1_1″ spacing=”” center_content=”no” link=”” target=”_self” min_height=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=”” background_color=”” background_image=”” background_image_id=”” background_position=”left top” background_repeat=”no-repeat” hover_type=”none” border_size=”0″ border_color=”” border_style=”solid” border_position=”all” padding_top=”” padding_right=”” padding_bottom=”” padding_left=”” margin_top=”” margin_bottom=”” animation_type=”” animation_direction=”left” animation_speed=”0.3″ animation_offset=”” last=”no”][fusion_text columns=”” column_min_width=”” column_spacing=”” rule_style=”default” rule_size=”” rule_color=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” class=”” id=””]Display the Form
Post-Submit Form
USP enables you to display a post-submission form anywhere on your site.
Use the shortcode to display the form on any WP Post or Page:
[user-submitted-posts]
Or, use the template tag to display the form anywhere in your theme template:
Login/Register Form
You also can display a form that enables users to log in, register, or reset their password.
Use the shortcode to display the form on any WP Post or Page:
[usp-login-form]
Or, use the template tag to display the form anywhere in your theme template:
Display Submitted Posts
Use this shortcode to display a list of submitted posts on any WP Post or Page:
[usp_display_posts]
Or, use the template tag to display a list of submitted posts anywhere in your theme template:
Here are some examples showing how to configure this shortcode:
[usp_display_posts] : default displays all submitted posts by all authors
[usp_display_posts userid=”1″] : displays all submitted posts by registered user with ID = 1
[usp_display_posts userid=”Pat Smith”] : displays all submitted posts by author name “Pat Smith”
[usp_display_posts userid=”all”] : displays all submitted posts by all users/authors
[usp_display_posts userid=”all” numposts=”5″] : limit to 5 posts from all users
Display Image Gallery
Use this shortcode to display a gallery of uploaded images for each submitted post:
[usp_gallery]
Or, use the template tag to display an image gallery anywhere in your theme template:
You can customize using any of the follwing attributes:
$size = image size as thumbnail, medium, large or full -> default = thumbnail
$before = text/markup displayed before the image URL -> default = {a href=’%%url%%’}{img src=’
$after = text/markup displayed after the image URL -> default = ‘ /}{/a}
$number = the number of images to display for each post -> default = false (display all)
$postId = an optional post ID to use -> default = false (uses global/current post)
Notes:
Use curly brackets to output angle brackets
Use single quotes in before/after attributes
Can use %%url%% to get the URL of the full-size image
Check out the source code inline notes for more info
Reset Form Button
This shortcode displays a link that resets the form to its original state:
[usp-reset-button]
This shortcode accepts the following attributes:
class = classes for the parent element (optional, default: none)
value = link text (optional, default: “Reset form”)
url = the URL where your form is displayed (required, default: none)
custom = any attributes or custom code for the link element (optional, default: none)
Note that the url attribute accepts %%current%% to get the current URL.
Access Control
USP provides three shortcodes to control access and restrict content.
Display content only to users with a specific capability:
[usp_access cap=”read” deny=”Message for users without read capability”][/usp_access]
Display content to logged-in users:
[usp_member deny=”Message for users who are not logged in”][/usp_member]
Display content to visitors only:
[usp_visitor deny=”Message for users who are logged in”][/usp_visitor]
Tip: to include markup in the deny message, you can use {tag} to output .
Example
If the user is logged in, display the post-submit form; or if the user is not logged in, display the login form:
[usp_member]
[user-submitted-posts]
[/usp_member]
[usp_visitor]
[usp-login-form]
[/usp_visitor][/fusion_text][/fusion_builder_column][/fusion_builder_row][/fusion_builder_container]
