User Submitted Posts Plugin WordPress, Download, Install
Easily submit posts and images from the front-end of your site.
User Submitted Posts Download Now
(If the link does not work)↓
Originals Link WordPress.org
https://wordpress.org/plugins/user-submitted-posts/
How to Install User Submitted Posts Plugin, Manually
Installation
- Upload the plugin to your blog and activate
- Visit the USP settings to configure your options
More info on installing WP plugins
Usage
To display the submission form on any WP Post or Page, add the USP Shortcode:
[user-submitted-posts]
Or, to display the form anywhere in your theme, add the USP Template Tag:
<?php if (function_exists('user_submitted_posts')) user_submitted_posts(); ?>
Customizing the form
There are three main ways of customizing the form:
- Via plugin settings, you can show/hide fields, configure options, etc.
- Via custom form template (see “Custom Submission Form” for more info)
- By using USP action/filter hooks (advanced):
Filters: usp_post_status usp_post_author usp_form_shortcode usp_mail_subject usp_mail_message usp_new_post usp_input_validate usp_require_login Actions usp_submit_success usp_submit_error usp_insert_before usp_insert_after usp_files_before usp_files_after usp_current_page
Check out the complete list of action hooks for User Submitted Posts
More info about WordPress Actions and Filters
Custom Submission Form
Out of the box, User Submitted Posts provides a highly configurable submission form. Simply visit the plugin settings to control which fields are displayed, set the Challenge Question, configure submitted images, and much more.
There are situations, however, where advanced form configuration may be required. In order to allow for this, the USP plugin makes it possible to create a customized submission form. Here are the steps:
- Copy
usp.css
from/resources/
and paste into the/custom/
directory - Copy
submission-form.php
from/views/
and paste into the/custom/
directory - Visit the plugin settings and change “Form style” to “Custom form + CSS”
- Customize either of the new files as desired, they will not be overwritten when the plugin is updated
Alternately, you can enable the option “HTML5 Form + Disable CSS” to use your own CSS along with the default USP form.
Or, to go further with unlimited custom forms, check out USP Pro 🙂
Displaying submitted posts
User-submitted posts are handled by WordPress as regular Posts. So they are displayed along with other posts according to your WP Theme. Additionally, each submitted post includes a set of Custom Fields that include the following information:
is_submission
– indicates that the post is a user-submitted postuser_submit_image
– the URL of the submitted image (one custom field per image)user_submit_ip
– the IP address of the submitted-post authoruser_submit_name
– the name of the submitted-post authoruser_submit_url
– the submitted URL
There are numerous ways to display these Custom Fields. The easiest way is to visit the plugin settings and configure the options available under “Auto-Display Content”. There you can enable auto-display of submitted email address, URL, and images. Note that submitted images also are uploaded to the WP Media Library.
For more flexibility, you can use a variety of WP Template Tags (e.g., get_post_meta()) to display Custom Fields. Here are some tutorials for more information:
And here are some tutorials that may help with custom display of submitted images:
Also, here is a Helper Plugin to display Custom Fields. It originally is designed for use with USP Pro, but also works great with the free version of USP.
Auto Display Images
To automatically display submitted images on the frontend, visit the plugin settings, “Images Auto-Display” and select whether to display the images before or after post content. Save changes.
Featured Images
To set submitted images as Featured Images (aka Post Thumbnails) for submitted posts, visit the plugin settings, “Image Uploads” and check the box to enable “Featured Image”. Save changes.
Shortcodes
User Submitted Posts includes two shortcodes:
[user-submitted-posts]
– displays the USP form on any Post or Page[usp_display_posts]
– displays a list of all user-submitted posts
The [user-submitted-posts]
shortcode does not have any attributes. You simply include it wherever you want to display the form.
The [usp_display_posts]
shortcode has two optional attributes, “userid” and “numposts”. Examples:
[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
By default [usp_display_posts]
displays all submitted posts by all authors. So the attributes can be used to customize as desired.
Template tags
USP also includes a set of template tags for customizing and displaying submitted posts:
/* Display the USP Form Usage: <?php if (function_exists('user_submitted_posts')) user_submitted_posts(); ?> */ user_submitted_posts() /* Check if post is a submitted post Returns true or false Usage: <?php if (usp_is_public_submission()) return true; ?> */ usp_is_public_submission() /* Get all image URLs Returns an array of image URLs that are attached to the current submitted post Usage: <?php $images = usp_get_post_images(); foreach ($images as $image) echo $image; ?> */ usp_get_post_images() /* Display all images Outputs a set of <img> tags for images attached to the current submitted post Usage: <?php usp_post_attachments($size, $beforeUrl, $afterUrl, $numberImages, $postId); ?> Parameters: $size = image size: thumbnail, medium, large or full -> default = full $beforeUrl = text/markup displayed before each image URL -> default = <img src=" $afterUrl = text/markup displayed after each image URL -> default = " /> $numberImages = number of images to display for each post -> default = false (display all) $postId = an optional post ID to use -> default = uses global post */ usp_post_attachments() /* Display submitted author name and URL This tag displays one of the following: - The author's submitted name as a link (if both 'User Name' and 'Post URL' fields are included in the form) - The author's submitted name as plain text (if 'User Name' is included in the form, but 'Post URL' is not included) - The author's registered username as a link to the author's post archive (if 'User Name' is not included in the form) Usage: <?php usp_author_link(); ?> */ usp_author_link()
These template tags should work out of the box when included in your theme template file(s). Keep in mind that for some of the tags to work, there must be some existing submitted posts and/or images available.
The source code for these tags is located in /library/template-tags.php
.
Upgrades
To upgrade User Submitted Posts, remove the old version and replace with the new version. Or just click “Update” from the Plugins screen and let WordPress do it for you automatically.
Note: uninstalling the plugin from the WP Plugins screen results in the removal of all settings from the WP database. Submitted posts are NOT removed if you deactivate the plugin, reset default options, or uninstall the plugins; that is, all submitted posts must be removed manually.
Restore Default Options
To restore default plugin options, either uninstall/reinstall the plugin, or visit the plugin settings > Restore Default Options.
Uninstalling
User Submitted Posts cleans up after itself. All plugin settings will be removed from your database when the plugin is uninstalled via the Plugins screen. Submitted posts are NOT removed if you deactivate the plugin, reset default options, or uninstall the plugins; that is, all submitted posts must be removed manually.
Pro Version
Pro version of USP now available! USP Pro includes many more awesome features and settings, with unlimited custom forms, infinite custom fields, multimedia file uploads, and much, much more.
- Check out USP Pro for virtually limitless form-building action »
- Read what users are saying about USP Pro »
Video
Screenshots
Plugin Not Working?
If any errors or problems with the plug-in then write comments.