USP Pro really shines when it comes to ease of use: building forms and displaying submitted content is quick and easy with a complete collection of Shortcodes and Template Tags. USP Pro provides Shortcodes that make it easy to display forms, submitted content, and user info virtually anywhere. This guide serves as a complete reference for all USP Pro Shortcodes.

Menu

Form Shortcodes

The following Shortcodes may be used to display forms, fields, and more.

Shortcode Name Shortcode Description Attribute Definitions
[usp_form id="example"] Displays the USP Form specified by its ID or slug. Each form’s shortcode is displayed in the “Shortcode” column of the “USP Forms” screen. For this shortcode to work, the form must be published (not draft or pending).
  • id – (required) the form ID or slug
[usp_fieldset][#usp_fieldset] Wraps any form content with a fieldset element <fieldset>. While creating a form, click the “USP:Fieldset” quicktag to include the opening fieldset, then again to include the closing fieldset. More info »
  • class – any additional class names, comma-separated
[usp_name] Displays a form input for the user’s name. Additional user options available in the General Settings.
  • class – any additional class names, comma-separated
  • placeholder – placeholder text (default: “Your Name”)
  • label – label text (default: “Your Name”)
  • required – should the input be required (“yes” or “no”)
  • max – maximum number of characters (default: “999999”)
  • custom – any valid attribute, for example: custom="key='val'" (use single quotes)
  • fieldset – enable auto-fieldset: true, false, or custom class name (default: true)
[usp_url] Displays a form input for the user’s URL.
  • class – any additional class names, comma-separated
  • placeholder – placeholder text (default: “Your URL”)
  • label – label text (default: “Your URL”)
  • required – should the input be required (“yes” or “no”)
  • max – maximum number of characters (default: “999999”)
  • custom – any valid attribute, for example: custom="key='val'" (use single quotes)
  • fieldset – enable auto-fieldset: true, false, or custom class name (default: true)
[usp_title] Displays a form input for the submitted post title.
  • class – any additional class names, comma-separated
  • placeholder – placeholder text (default: “Post Title”)
  • label – label text (default: “Post Title”)
  • required – should the input be required (“yes” or “no”)
  • max – maximum number of characters (default: “999999”)
  • custom – any valid attribute, for example: custom="key='val'" (use single quotes)
  • fieldset – enable auto-fieldset: true, false, or custom class name (default: true)
[usp_captcha] Displays a form input for the anti-spam challenge question/captcha. Field always is required when included. Additional captcha options available in the General Settings. Google reCAPTCHA may be used instead of the default challenge question. After the captcha field is configured in the USP General Settings, it may be added to any form using the Shortcode [usp_captcha]. To learn more, check out the Google reCAPTCHA tutorial.

Note that these attributes apply only to the default challenge question (not the Google reCAPTCHA).

  • class – any additional class names, comma-separated
  • placeholder – placeholder text (default: “1 + 1 =”)
  • label – label text (default: “1 + 1 =”)
  • max – maximum number of characters (default: “999999”)
  • custom – any valid attribute, for example: custom="key='val'" (use single quotes)
  • fieldset – enable auto-fieldset: true, false, or custom class name (default: true)
[usp_category] Displays the a form input for the post category. Additional category options available in the General Settings.
  • type – type of field: dropdown or checkbox (default: value of the option, General ▸ Category Menu)
  • class – any additional class names, comma-separated
  • label – label text (default: “Post Category”)
  • default – customize the “Please select…” text when type is set to “dropdown”.
  • required – should the input be required (“yes” or “no”)
  • cats – additional categories to include (comma-separated list of cat IDs). Any cats specified here will be included via separate hidden field.
  • size – size of the select menu (when type = dropdown)
  • multiple – allow users to select multiple options (“yes” or “no”). Does not apply to checkbox menu.
  • include – comma-separated list of cat IDs to include (in addition to any categories selected in USP Pro General settings ▸ Post Categories). Use all to include all non-empty cats, or all_include_empty to include all cats, even if empty.
  • exclude – comma-separated list of cat IDs to exclude (overrides categories selected in General ▸ Categories)
  • custom – any valid attribute, for example: custom="key='val'" (use single quotes)
  • fieldset – enable auto-fieldset: true, false, or custom class name (default: true)
  • combo – unique id for chained/combo category fields, must be a number 1 thru 5 (default: none)
[usp_tags] Displays a form input for the submitted post tags. Additional tag options available in the General Settings.
  • type – type of field: input, dropdown, or checkbox (default: value of the option, General ▸ Tag Menu)
  • class – any additional class names, comma-separated
  • placeholder – placeholder text (default: “Post Tags”)
  • label – label text (default: “Post Tags”)
  • default – customize the “Please select…” text when type is set to “dropdown”.
  • required – should the input be required (“yes” or “no”)
  • max – maximum number of characters (default: “999999”)
  • tags – additional tags to include (comma-separated list of tag IDs). Any tags specified here will be included via separate hidden field.
  • size – size of the select menu (when type = dropdown)
  • multiple – allow users to select multiple options (“yes” or “no”). Does not apply to checkbox menu.
  • include – comma-separated list of tag IDs to include (in addition to any tags selected in USP Pro General settings ▸ Post Tags). Use all to include all non-empty tags, or all_include_empty to include all tags, even if empty.
  • exclude – comma-separated list of tag IDs to exclude (overrides tags selected in General ▸ Tags)
  • custom – any valid attribute, for example: custom="key='val'" (use single quotes)
  • fieldset – enable auto-fieldset: true, false, or custom class name (default: true)
[usp_taxonomy] Displays the a form input for the specified terms of a custom taxonomy. Learn more »
  • type – specifies the type of field to display: checkbox or dropdown (default: dropdown)
  • class – any additional class names, comma-separated
  • placeholder – placeholder text (default: “Taxonomy”)
  • label – label text (default: “Taxonomy”)
  • default – customize the “Please select…” text when type is set to “dropdown”.
  • required – should the input be required (“yes” or “no”)
  • tax – specifies the taxonomy (e.g., “animals”)
  • size – size of the select menu (when type = dropdown)
  • multiple – allow users to select multiple options (“yes” or “no”). Does not apply to checkbox menu.
  • terms – specifies which tax terms to include (comma-separated list of term IDs). Use all to include all non-empty taxonomy terms, or all_include_empty to include all taxonomy terms, even if empty.
  • exclude – comma-separated list of term IDs to exclude (useful when setting terms to “all”)
  • custom – any valid attribute, for example: custom="key='val'" (use single quotes)
  • fieldset – enable auto-fieldset: true, false, or custom class name (default: true)
[usp_content] Displays a form input for the post content. Additional content options available in the General Settings.
  • class – any additional class names, comma-separated
  • placeholder – placeholder text (default: “Post Content”)
  • label – label text (default: “Post Content”)
  • required – should the input be required (“yes” or “no”)
  • max – maximum number of characters (default: “999999”)
  • cols – number of columns for textarea (default: “30”)
  • rows – number of rows for textarea (default: “3”)
  • richtext – enable WP richtext editor (“on” or “off”)
  • custom – any valid attribute, for example: custom="key='val'" (use single quotes)
  • fieldset – enable auto-fieldset: true, false, or custom class name (default: true)
[usp_excerpt] Displays a form input for the post excerpt. Additional excerpt options available in the General Settings.
  • class – any additional class names, comma-separated
  • placeholder – placeholder text (default: “Post Excerpt”)
  • label – label text (default: “Post Excerpt”)
  • required – should the input be required (“yes” or “no”)
  • max – maximum number of characters (default: “999999”)
  • cols – number of columns for textarea (default: “30”)
  • rows – number of rows for textarea (default: “3”)
  • richtext – enable WP richtext editor (“on” or “off”)
  • custom – any valid attribute, for example: custom="key='val'" (use single quotes)
  • fieldset – enable auto-fieldset: true, false, or custom class name (default: true)
[usp_files] Displays a form input for file-upload(s). Additional file/upload options available in the Uploads Settings. Learn more »
  • class – any additional class names, comma-separated
  • placeholder – placeholder text (default: “File(s)”)
  • label – label text (default: “File(s)”)
  • required – should the input be required (“yes” or “no”)
  • max – maximum number of characters in the file name (default: “999999”)
  • link – text for the “Add another file” link (when included)
  • multiple – enable multiple file uploads (default true)
  • method – file-selection method: “select” = select multiple files from the “Choose files” prompt; or leave blank to use the “Add another file” link
  • key – specify an optional numeric key value (when “multiple” is set to false)
  • types – comma-separated list of allowed file types (overrides default/global settings, see Uploads Settings)
  • custom – any valid attribute, for example: custom="key='val'" (use single quotes)
  • preview_off – set to “true” to disable previews; exclude from shortcode to enable previews
  • files_min – minimum number of allowed files (default: value of Uploads ▸ “Minimum number of files”)
  • files_max – maximum number of allowed files (default: value of Uploads ▸ “Maximum number of files”)
  • fieldset – enable auto-fieldset: true, false, or custom class name (default: true)
[usp_custom_field form="123" id="1"] Displays a custom input for form “123” (slug or ID), defined by custom field “1” (ID). Note that the custom field specified by the id must be defined. You can grab the shortcode for existing custom fields from the “Custom Fields” panel on the “USP Forms” screen. Additional custom-field options available in the Advanced Settings. See also the next table “Custom Field Attributes” for complete list of custom-field shortcode attributes.
  • form – (required) numerical ID of the form
  • id – (required) the ID of a custom field defined for the specified form ID
  • See also the next table “Custom Field Attributes” for complete list of attributes.
[usp_email] Displays the a form input for the user’s email addresss. Additional email options available in the Admin Settings.
  • class – any additional class names, comma-separated
  • placeholder – placeholder text (default: “Email Address”)
  • label – label text (default: “Email Address”)
  • required – should the input be required (“yes” or “no”)
  • max – maximum number of characters (default: “999999”)
  • custom – any valid attribute, for example: custom="key='val'" (use single quotes)
  • fieldset – enable auto-fieldset: true, false, or custom class name (default: true)
[usp_subject] Displays a form input for the email subject line. Additional email options available in the Admin Settings.
  • class – any additional class names, comma-separated
  • placeholder – placeholder text (default: “Email Subject”)
  • label – label text (default: “Email Subject”)
  • required – should the input be required (“yes” or “no”)
  • max – maximum number of characters (default: “999999”)
  • custom – any valid attribute, for example: custom="key='val'" (use single quotes)
  • fieldset – enable auto-fieldset: true, false, or custom class name (default: true)
[usp_submit] Displays a submit button for the form. See also the option “Auto-include submit button” in the Advanced Settings.
  • class – any additional class names, comma-separated
  • value – text for submit button (default: “Submit Post”)
  • custom – any valid attribute, for example: custom="key='val'" (use single quotes)
  • fieldset – enable auto-fieldset: true, false, or custom class name (default: true)
[usp_reset_button] Displays a link to reset the form.
  • class – any additional class names, comma-separated
  • value – text for reset link (default: “Reset form”)
  • url – (required, no default) URL that displays the form, for example: http://example.com/submit/
  • custom – any valid attribute, for example: custom="key='val'" (use single quotes)
[usp_remember] Displays a checkbox to “remember” form values. See also the options “Remember Form Values” and “Memory Strength” in the Basic Settings.
  • class – any additional class names, comma-separated
  • label – label text (default: “Remember me”)
  • checked – select/check the box by default (“yes” or “no”)
  • custom – any valid attribute, for example: custom="key='val'" (use single quotes)
  • fieldset – enable auto-fieldset: true, false, or custom class name (default: true)
[usp_cc] Displays a message intended for CC/email recipients. Could actually be used for any text. See also the options “CC User Message” and “Contact” in the Admin Settings.
  • class – any additional class names, comma-separated
  • text – label text (default: uses the plugin setting “CC User Message” in the Admin Settings)
  • custom – any valid attribute, for example: custom="key='val'" (use single quotes)
[usp_redirect] Redirects to specified URL on successful form submission (applies to current form only, overrides default setting)
  • url – any complete/full URL (e.g., http://example.com/success/)
  • custom – any string that should be included in the input tag. For example, you can add attribute(s) using single quotes (e.g., class='example classes' data-role='custom')
[usp_agree] Displays an Agree to Terms Box.
  • label – (optional) label text for the required checkbox, can use curly brackets to include basic markup, for example: {em class='myclass'}emphasized{/em} (use single quotes for attributes) (default: I agree to the terms)
  • toggle – (optional) text used for the toggle-terms link (default: Show/hide terms)
  • terms – (optional) text used for the terms info, can use curly brackets to include basic markup, for example: {em class='myclass'}emphasized{/em} (use single quotes for attributes) (default: Put terms here.)
  • custom – (optional) custom attributes for the required checkbox (default: none)
  • style – (optional) custom CSS for the required checkbox (default: none)
  • script – (optional) custom JavaScript for the required checkbox (default: none)
  • alert – (optional) enable the JavaScript alert: enter text to enable or leave blank to disable (default: blank)
  • class – (optional) custom classes for the required checkbox (default: none)
  • fieldset – (optional) enable auto-fieldset: true, false, or custom class name (default: true)
  • required – (optional) whether the field should be required: true or false (default: true)
  • default – (optional) should the box be checked by default: true or false (default: false)
[usp_login_form] Displays a Login/Register Form. No attributes for this shortcode :)
[usp_user_avatar] Displays the avatar for the currently logged-in user.
  • size – the size (in pixels) of the avatar

Custom Field Shortcode

Here is a complete list of attributes for the Custom Field Shortcode, [usp_custom_field]. Note: to add markup to supportive attributes, replace angle brackets < and > with curly brackets { and }, such that <h3> is written as {h3}. Learn more about USP Custom Fields »

Shortcode Name Shortcode Description Attribute Definitions
Shortcode Attributes for [usp_custom_field] Each custom shortcode accepts a variety of attributes defined as the value of its custom field. So for example, attributes for the shortcode [usp_custom_field form="123" id="1"] may be customized by adding attribute#value pairs to the first custom field of form 123. Separate multiple attributes with vertical bars |. Learn more »
  • Syntax: attribute#value– custom attributes, where “attribute” is the name and “value” is the value. Supported attributes:
    • field – input (default), textarea, select, input_checkbox, input_radio, input_file
    • type (when field is set to input) – text (default), checkbox, password, radio, url, search, email, tel, month, week, time, datetime, datetime-local, color, date, range, number, hidden
    • name – specifies the name attribute. Should match value of for, if included (default: usp-custom-#)
    • for – specifies the for attribute of the <label> tag. Should match value of name, if included (default: usp-custom-#)
    • value – specifies the value attribute. Important: use this attribute only when required (eg, textareas). Default: if “Remember Me” checkbox enabled, default value is the remembered value; otherwise, there is no default value. Note: you can use basic markup for this attribute, eg: value#<div class='test'>test</div> (use single quotes).
    • data-required – true (default), false, or null (to disable)
    • placeholder – placeholder text (default: “Custom Field #”)
    • class – additional classes for input (default: none)
    • checked – adds a “checked” attribute to the field (default: none)
    • accept – MIME type, eg: audio/*, video/*, more (default: image/*)
    • field_class – fieldset class (default: none)
    • fieldset – disable fieldset (use fieldset#null)
    • label – label text (default: “Example Label #”). Note: use label#null to disable the field label.
    • label_class – label class (default: none)
    • label_custom – custom attributes for label, eg: label_custom#foo="bar" (default: none)
    • custom_1 thru custom_5 – custom field attributes (anything not listed above). Syntax: custom_1#attribute:value, where “attribute” is the name and “value” is the value. (default: none)
    • rows – number of rows for textarea (default: 3)
    • cols – number of columns for textarea (default: 30)
    • options – list of options for select field (when field = select). Separate options with a colon, eg: options#null:input1:input2:input3 (Note: including null results in an empty <option> for the “Please Select” message).
    • option_select – specifies the selected option when using the options attribute (default: none)
    • option_default – text to use for the null field (if included) when using the options attribute (default: “Please Select”)
    • selected – adds a “selected” attribute to any field (default: none)
    • checkboxes – list of values for multiple checkboxes (when field = input_checkbox). Separate values with colons, for example: checkboxes#input1:input2:input3
    • checkboxes_checked – list of checkboxes that should be checked. Note: values listed here must be included in the checkboxes attribute. Separate multiple values with colons.
    • checkboxes_req – list of checkboxes that should be required. Note: values listed here must be included in the checkboxes attribute. Separate multiple values with colons.
    • radio_inputs – list of radio inputs (when field = input_radio). Separate options with a colon, eg: radio_inputs#input1:input2:input3 (default: none).
    • radio_checked – specifies the selected radio input (default: none)
    • desc – adds a description/label to the group of radio or checkbox inputs (default: none)
    • multiple – enable user to select multiple options, “true” or “false” (default: false)
    • method – method of selecting multiple files, either “select” for select/dropdown menu, or leave blank to use “Add another” link (default: “Add another” link)
    • link – text to use for the “Add another” link (default: “Add another”)
    • types – allowed file types, comma separated (default: value of Uploads ▸ “Allowed File Types”)
    • max – adds maxlength attribute if used with a files field (i.e., field#input_file), otherwise adds a max attribute.
    • min – adds a min attribute to supportive fields.
    • preview_off – set to “true” to disable file preview, or exclude to enable file preview (default: enabled)
    • files_min – min number of allowed files (default: value of Uploads ▸ “Minimum number of files”)
    • files_max – max number of allowed files (default: value of Uploads ▸ “Maximum number of files”)
    • data-custom#custom-att – any name/value pair will be included in the custom field, for example id#custom will add an id attribute with a value of custom (e.g., id="custom")
    • data-richtext – custom field ID for RTE textarea. Enable WP RTE for textarea fields. (true = enable) (default: none/disable)
    • rte_id – custom field ID for RTE textarea. Only required when including multiple custom RTEs in a form. Important: the rte_id must be lowercase letters only! (default: none)
User Registration Attributes for [usp_custom_field] In addition to the custom attributes defined above, here is a set of attributes that is useful when using a USP Form to register new users. They may be used in addition to any of the attributes defined above. Separate multiple attributes with vertical bars |. Note that a full set of the user-registration shortcodes is available in the “User Registration” form demo. Learn more »
  • Syntax: attribute#value– custom attributes, where “attribute” is the name and “value” is the value. Supported attributes for user-registration forms:
    • Nicename:
      name#nicename
      for#nicename
      label#Nicename
      placeholder#Nicename
    • Display Name:
      name#displayname
      for#displayname
      label#Display Name
      placeholder#Display Name
    • Nickname:
      name#nickname
      for#nickname
      label#Nickname
      placeholder#Nickname
    • First Name:
      name#firstname
      for#firstname
      label#First Name
      placeholder#First Name
    • Last Name:
      name#lastname
      for#lastname
      label#Last Name
      placeholder#Last Name
    • Description:
      name#description
      for#description
      label#Description
      placeholder#Description
    • Password:
      name#password
      for#password
      label#Password
      placeholder#Password
      Note: as of WP 4.3.1, the custom password field no longer works (see the Notice near the top of this post for more info).
Post Format Attributes for [usp_custom_field] In addition to the custom attributes defined above, you may also create a form field for setting the Post Format. See also: Custom Post Formats via Hidden Field
  • Syntax: attribute#value– custom attributes, where “attribute” is the name and “value” is the value. Required attributes for Post-Format field:
    • Required hidden field with no label, setting the post-format to “quote”: type#hidden|name#format|value#quote|fieldset#null|label#null
    • Optional visible text-input field with label and placeholder: label#Post Format|placeholder#Post Format|type#text|name#format|for#format|data-required#false

Content Shortcodes

The following Content Shortcodes display various types of submitted content. Note: to add markup to supportive attributes, replace angle brackets < and > with curly brackets { and }, such that <h3> is written as {h3}.

Shortcode Name Shortcode Description Attribute Definitions
[usp_is_submission][/usp_is_submission] Used as a conditional shortcode, usp_is_submission displays enclosed content only if the post is submitted via USP.
  • deny – message to display when the post is not a submitted post
[usp_submitted] Displays a list of submitted file URLs for the specified/current post (gets all file types as custom fields)
  • id – optional post id (uses current post if not specified)
  • link – href value for optional link: parent, http://example.com/url/, or empty for none
  • number – the number of URLs to display
  • before – optional markup to display before each URL
  • after – optional markup to display after each URL
[usp_images] Displays formatted URLs for image attachments (gets only images from the Media Library)
  • id – optional post id (uses current post if not specified)
  • number – the number of URLs to display
  • size – image size: thumbnail, medium, large or full (or any defined image size)
  • before – optional markup to display before each URL
  • after – optional markup to display after each URL
[usp_file] Displays the formatted URLs for post attachments (gets all file types from the Media Library)
  • id – optional post id (uses current post if not specified)
  • number – the number of URLs to display
  • before – optional markup to display before each URL
  • after – optional markup to display after each URL
[usp_attachments] Displays links to attachment pages for each post
  • id – optional post ID (default: global/current post)
  • number – number of links to display for each post (default: false = display all)
  • file – an optional, specific uploaded file (default: false = display all)
  • beforeitem – text/markup to display before each item (default: {li})
  • afteritem – text/markup to display after each item (default: {/li})
  • beforelist – text/markup to display before all items (default: {ul})
  • afterlist – text/markup to display after all items (default: {/ul})
[usp_filename] Displays the filename of the specified attachment
  • id – optional post id (uses current post if not specified)
  • file – optional custom-field ID of the file to display (default: ID = 1)
[usp_latest] Displays optionally formatted URL(s) of the latest attachment(s)
  • id – optional post id (uses current post if not specified)
  • url – href value for optional link: attachment, post, or file (default: file = URL only, no link)
  • number – the number of recent attachments to display
  • before – markup before each URL (default: none)
  • after – markup after each URL (default: none)
[usp_meta] Displays the value of the specified custom field
  • id – optional post id (uses current post if not specified)
  • meta – name of custom field to use (default: usp-author)
[usp_all_meta] Displays all usp custom fields for current or specified post (key => value)
  • id – optional post id (uses current post if not specified)
  • sep – text/markup to appear between the custom field key and value (default: “=>”)
  • before – text/markup to display before each key/value pair (default: {div})
  • after – text/markup to display after each key/value pair (default: {/div})
[usp_image] Displays formatted images from within post loop, or the same for specified images outside the loop (i.e., anywhere in the theme)
  • ids – any attachment ID or comma-separated list of attachment IDs (default: empty = display all images)
  • file – name of any image custom field, for example usp-file-1 (default: empty/none) (note: when specified, the file attribute overrides the ids attribute)
  • post_id – specifies the post for which images should be displayed (default: empty = display images from current post)
  • number – the number of images for which to retrieve data (default: empty = display all)
  • size – attachment size: thumbnail, medium, large full, or any defined size (default: thumbnail)
  • icon – whether to use a media icon for the attachment: true or false (default: false)
  • link – href value for link: file, attachment, parent, image, http://example.com/ (default: empty = no link, image only)
  • link_class – additional classes (defaults to lightbox)
  • link_att – optional attribute(s) for links, for example: link_att="attribute='value'" (use single quotes around the value). Note: you can use #id#" to include the current post ID (default: rel='lightbox')
  • link_title – title for links when enabled (default: use attachment description for title)
  • img_class – class name(s) for each image (default: usp-image)
  • img_att – optional attribute(s) for images, for example: img_att="attribute='value'" (use single quotes around the value). Note: you can use #id#" to include the current post ID (default: target='_blank')
  • beforeitem – text/markup to display before each item (default: {span class="usp-image-wrap"})
  • afteritem – text/markup to display after each item (default: {/span})
  • beforelist – text/markup to display before all items (default: {div class="usp-images-wrap"})
  • afterlist – text/markup to display after all items (default: {/div})
[usp_author_name] Displays author name from custom field as a link (if URL provided) or plain text (if URL not provided)
  • No attributes for this shortcode :)
[usp_avatar] Displays the avatar (image) of the specified submitter
  • postid – an optional post ID to use (default: global/current post)
  • userid – an optional email to use (default: none)
  • size – size of avatar (max = 512, default: 96)
  • default – default image URL (default: “Mystery Man”)
  • alt – alt-text for image att (default: none)
[usp_video] Displays the specified video(s). This is basically a wrapper for WP’s shortcode. Currently supported video formats: mp4, m4v, webm, ogv, wmv, flv. Visit the Codex to learn more »
  • id – optional post ID (default: global/current post)
  • file – optional uploaded file ID (i.e., ID of custom field)
  • poster – defines image to show as placeholder before the media plays (default: none)
  • loop – allows for the looping of media: “on” or “off” (default: off)
  • autoplay – causes the media to automatically play as soon as the media file is ready (default: off)
  • preload – specifies if and how the video should be loaded when the page loads: metadata, none, or auto (default: metadata)
  • height – defines height of the media in pixels (default: detected video height)
  • width – defines width of the media in pixels (default: detected video width)
[usp_audio loop="" autoplay="" preload=""] Displays the specified audio media. This is basically a wrapper for WP’s shortcode. Currently supported audio formats: mp3, ogg, wma, m4a, wav. Visit the Codex to learn more »
  • id – optional post ID (default: global/current post)
  • file – optional uploaded file ID (i.e., ID of custom field)
  • number – number of files (default: empty = display all)
  • before – markup before each item (default: none)
  • after – markup after each item (default: none)
  • loop – allows for the looping of media: “on” or “off” (default: off)
  • autoplay – causes the media to automatically play as soon as the media file is ready (default: off)
  • preload – specifies if and how the audio should be loaded when the page loads: metadata, none, or auto (default: metadata)
[usp_access cap="read"][/usp_access] Require login based on capability to view content. For example, to display something to logged-in users who can edit posts, we could do this: [usp_access cap="edit_posts"] something [/usp_access]. Learn more about WP Capabilities »
  • cap – the capability required for the user to view the content (comma separated) (default: read)
  • deny – message to display when the user is not qualified (default: none)
[usp_visitor][/usp_visitor] Display content to visitors only.
  • deny – message to display when the user is not qualified (default: none)
[usp_member][/usp_member] Display content to members only.
  • deny – message to display when the user is not qualified (default: none)
[usp_status] Display content to members only. Note: see the USP Post “Shortcode Demo” for an example of this shortcode.
  • before – markup before the status (default: none)
  • after – markup after the status (default: none)
  • display – the user info to display: status, name, role, email, or id (default: status)
  • logintext – text to display for logged-in status (when using display “status”) (default: “logged in”)
  • logouttext – text to display for logged-out status (when using display “status”) (default: “logged out”)
[usp_get_posts] Display posts from given category or other query (basically a shortcode wrapper for WP’s get_posts() function). Check the Codex page for more info. Note: use curly brackets {} instead of angle brackets <> for the “before” and “after” attributes.
  • This shortcode accepts the same parameters as get_posts() (attribute name = parameter name), plus the following:
  • before – markup before each post (default: none)
  • after – markup after the status (default: none)
  • classes – CSS classes for outer <div> (default: none)
  • content – display the post content (true or false)
  • meta – display basic post meta (true or false)
[usp_pro_display_posts] Displays a list of submitted post titles. Learn more »
  • userid – displays posts only from this author (default: display posts from all authors)
  • numposts – limits the number of displayed posts (default: display all posts)
[usp_post_expire] Enables users to submit posts that expire at a specific date and/or time. All attributes are optional. Note this is a paid extension. Learn more »
  • type – type of input field (date, time, datetime-local) (default: date)
  • label – text for associated input label (default: Date)
  • required – should the input be required (default: true)
  • fieldset – enable fieldset: true, false, or custom class (default: true)
  • class – comma-separated list of classes (default: none)
  • custom – any attributes or custom code (default: none)
  • max – max number of characters (default: unlimited)
  • error – custom name (displayed if there is an error) (default: value of label attribute)
[usp_email_alert]...[/usp_email_alert] Sends custom email alert for a USP Form. Learn more »
  • user – email alert for user or admin (default: user)
  • type – type of alert (submit, approval, denied, scheduled) (default: submit)
  • subject – subject line for email alert (default: Email Alert from Site Name)
  • cc – additional recipient address for admin alerts only (comma separate multiple values) (default: empty/none)
[usp_post_title id=""] Displays the submitted post title
  • id – the id of the post (default: none/empty, displays title of current post)
[usp_post_author] Displays the name of the post author
  • No attributes for this shortcode :)
[usp_post_author_submitted id=""] Displays the name of the submitted post author
  • id – the id of the post (default: none/empty, displays author of current post)

Notes & Resources

  • You can learn more about Shortcodes in the WP Codex.
  • All Shortcode attributes are optional unless stated otherwise.
  • All of the “Form Shortcodes” are available as Quicktags on the “Edit Form” screen.
  • Check out /inc/usp-functions.php for additional notes about the USP Content Shortcodes.
  • In addition to the Shortcodes provided by USP Pro, there are numerous default WordPress Shortcodes, as well as any Shortcodes that may be included with your theme and/or active plugins.