WordPress.org

Plugin Directory

User Submitted Posts

Easily submit posts and images from the front-end of your site.

Can you add this feature or that feature?

Please check the Pro version of USP, which includes many of the most commonly requested features from users. The free version also may include new features in future updates.

Images are not uploaded or displaying

If everything is configured properly, USP will display submitted images on the front-end. If that is not happening, here are some things to check:

  • Make sure that the setting "Images Auto-Display" is enabled
  • And/or make sure that the setting "Featured Image" is enabled
  • And/or make sure that your theme is set up to display submitted images

Assuming that everything is set up to display submitted images, here are some further things to check:

  • Is there any error message when trying to submit an image?
  • Check that the submitted images are uploaded to the Media Library
  • Check that the URL of the submitted image is attached to the submitted post as a Custom Field (on Edit Post screen)
  • Check the permission settings on the upload folder(s) by ensuring that you can successfully upload image files directly via the Media Uploader
  • Double-check that all the "Image Uploads" settings make sense, and that the images being uploaded meet the specified requirements

Note: when changing permissions on files and folders, it is important to use the least-restrictive settings possible. If you have to use more permissive settings, it is important to secure the directory against malicious activity. For more information check out: Secure Media Uploads

How to set submitted image as the featured image?

Here are the steps:

  • Visit USP settings > Options panel > Image Uploads > Featured Image
  • Check the box and click "Save Settings" to save your changes

Note that this setting merely assigns the submitted image as the Featured Image; it's up to your theme's single.php file to include the_post_thumbnail() to display the Featured Images. If your theme is not so equipped, check out this tutorial at WP-Mix.

How to require login?

Here is the easiest way of doing it (customize as needed):

if (is_user_logged_in()) {
    // the user is logged in, so display the submission form
    if (function_exists('user_submitted_posts')) user_submitted_posts();
} else { 
    // the user is not logged in, so do something else
    echo 'Please log in to submit posts!';
}

Basically what this code does is:

  1. Check if the user is logged in, and if so..
  2. Display the USP form
  3. Else, if the user is not logged in..
  4. Do whatever makes sense for your site (e.g., display a message)

For more information and techniques, check out these tutorials at WP-Mix:

Also note: USP Pro includes built-in shortcodes to display forms and other content to registered/logged-in users and/or guests/logged-out users.

How do I change the appearance of the submission form?

The easiest way to customize the form is via the plugin settings. There you can choose one of the following form configurations:

  • HTML5 Form + Default CSS (Recommended)
  • HTML5 Form + Disable CSS (Provide your own styles)
  • Custom Form + Custom CSS (Provide your own form template & styles)

Additionally, you can configure the settings to show/hide specific fields, control the number and size of submitted images, customize the Challenge Question, and much more.

To go beyond what's possible with the plugin settings, USP enables creation of a customized submission form. Here are the steps:

  1. Copy usp.css from /resources/ and paste into the /custom/ directory
  2. Copy submission-form.php from /views/ and paste into the /custom/ directory
  3. Visit the plugin settings and change "Form style" to "Custom form + CSS"
  4. 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 form. Then you can customize the form's CSS via /custom/usp.css or your theme's style.css.

For advanced customization, developers can use USP action and filter hooks.

Or, to go further with unlimited custom forms, check out USP Pro :)

What about security and spam?

User Submitted Posts uses the WordPress API to keep everything secure, fast, and flexible. The plugin also features a Challenge Question and hidden anti-spam field to stop automated spam and bad bots.

Can I include video?

The free version of USP supports uploads of images only, but some hosted videos may be included in the submitted content (textarea) by simply including the video URL on its own line. See this page for more info. Note that USP Pro enables users to upload video and much more.

How do I reset the plugin settings? Will it erase all of my submitted posts?

To reset plugin settings to factory defaults:

  • Visit "Restore Default Options" in the plugin settings
  • Check the box and save your changes
  • Deactivate the plugin and then reactivate it
  • Plugin settings now are restored to defaults

And no, restoring default settings does not delete any submitted posts. Even if you completely remove the plugin, the submitted posts will not be deleted. You have to remove them manually, if desired.

Wanted to be sure that the plugin does not require the exec() / exec.php or url_fopen functions, as both of those have been disabled on our host server for security reasons.

User Submitted Posts does not use any of "the exec() / exec.php or url_fopen functions". So you're good to go.

The Name and URL fields are not displayed in the form, even though they are set to display in the plugin options.

The setting "Registered Username" when enabled will automatically hide the Name field. Likewise the setting "User Profile URL" when enabled will automatically hide the URL field. Try enabling these settings and refreshing the form page.

More Questions & Answers

Question: "I'm new to wordpress and just installed your plugin User Submitted posts. What template do I add the code to have it work everywhere."

Answer: It really depends on the theme, as each tends to use template files differently.. it also depends on where on the page you would like to display the form, for example the sidebar (sidebar.php), the footer (footer.php), and so forth. Also, chances are that you'll need to add the form to more than one template file, for example index.php and page.php, etc. A good first place to try would be the sidebar, or maybe index.php and then go from there.

Question: "I have the option for multiple image uploads enabled in the plug-in settings however it does not work on the site. When you click on the Add another image text nothing happens."

Answer: The "Add another image" link is dependent on the required JavaScript being included in the page. Check the plugin setting to "Include JavaScript?" and you should be good to go.

Question: "I really like the new Rich Text editor, but the Add Media button only shows up if I'm logged in to the site, and so nobody else can see it. Is there a way to change that so that all readers wanting to submit something can use that button?"

Answer: As far as I know the user must be logged in to have access to file uploads, Media Library and the uploader. This is a security measure aimed at preventing foul play. The Pro version of USP, however, provides an option to enable Add Media uploads for all user levels.

Question: "I have it set so that articles get submitted under the users name. Sometimes when a user submits an article the article gets submitted under the users name, and other times set as the default user as set in the settings. When the article gets set to the default user I cannot change it in wordpress, I need to copy and paste the whole article to a new article and then set it to the proper user."

Answer: The registered username of the submitter can be used for post author only when the user is logged in to WordPress (otherwise it's impossible for WordPress to know their identity). Thus, to resolve the dilemma posed in the question, one solution is to require users to be logged in to submit posts. See the previous Q&A, "How to require login?". See also the related settings, "Registered Username" and "User Profile URL".

Question: "Can you explains how the setting 'Registered Username' works?"

Answer: Yes, here is a summary:

  • When "Registered Username" is enabled:
    • If the user is logged in, their registered username is used as the Post Author
    • If the user is logged out, the setting "Assigned Author" is used as the Post Author
  • When "Registered Username" is disabled:
    • The setting "Assigned Author" always is used as the Post Author for all users (whether logged in or not)

Question: "When displaying the post author and author URL for submitted posts, my theme uses the default assigned author. How can I change it so that my theme uses the submitted author name and author URL instead of the default assigned author?"

Answer: This functionality is built in to the Pro version of USP, but it's also possible using either of the following methods:

  • Replace your theme's current author tags with USP's usp_author_link()
  • By adding some custom code to your theme's functions.php file. If interested, please contact me directly and I will send the code and steps to implement.

Question: "Why doesn't the USP shortcode work when added to the WP Text widget?"

Answer: By default, WordPress does not enable shortcodes in widgets. I have added a plugin setting called "Enable Shortcodes" that will enable any/all shortcodes to work in widgets. Enable that setting and you should be good to go. Note: the "Enable Shortcodes" setting applies to all shortcodes, even those of other plugins. Check out WP-Mix for more information on enabling shortcodes in widgets.

Question: "How can I translate this plugin?"

Answer: There are many ways to translate, depending on your setup, skill level, etc. The easiest way that I know of is to install and use Loco Translate, which makes translating about as easy as it can be. FYI, USP's translation files are located in the /languages/ directory.

Questions? Feedback?

Send any questions or feedback via my contact form. Thanks! :)

Requires: 4.1 or higher
Compatible up to: 4.5.3
Last Updated: 3 months ago
Active Installs: 20,000+

Ratings

4.6 out of 5 stars

Support

16 of 19 support threads in the last two months have been marked resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

2 people say it works.
0 people say it's broken.

100,1,1
29,7,2
100,1,1
0,1,0
33,3,1
50,2,1
50,4,2
43,7,3
50,2,1
100,3,3
0,1,0
0,1,0
100,3,3 100,2,2 100,1,1 100,1,1
100,1,1 100,1,1
100,1,1
100,1,1 100,2,2
100,4,4
100,3,3
100,1,1 100,3,3
100,1,1
100,2,2 100,1,1
100,1,1
100,4,4
100,2,2 100,1,1 50,2,1
0,1,0
50,2,1
100,1,1 100,1,1
100,1,1
100,1,1 100,1,1
100,2,2
100,1,1
100,2,2
100,1,1
100,1,1 100,2,2
100,2,2