Plugin Planet

Premium WordPress Plugins

USP Pro makes it easy to display submitted content anywhere in your theme. Once a submitted Post, Page, or Custom Post Type is submitted and approved, it may be displayed using the shortcodes and template tags provided by USP Pro, as well as those provided by WordPress. Likewise, uploaded images, video, audio, and other supported file types may be displayed with granular control over the number, type, size, and other attributes of each file. Uploaded images may be used as featured images, displayed in post content, and/or displayed in post content automatically.

Post questions about Displaying Content using the form below.

Forum : Displaying Content

  1. Jon GorrieFebruary 22, 2014

    Regarding displayed images in the default Image Preview Demo:

    When displaying a post submitted with images, the images are displayed at my theme’s thumbnail size: 140×140

    How can I change this from the thumbnail size to say “medium” or “large” size, defined in the “Settings >> Media Settings” control panel? (here: )

    • Jeff Starr

      Jeff StarrFebruary 22, 2014

      Step 1) Disable the Uploads Setting to “Auto-display images”

      Step 2) Add this code to your theme template in the loop (e.g., single.php):

      $images = usp_get_images('medium', '<img src="', '" />', 1, false); 
      foreach ($images as $image) echo $image;

      Much more is possible with this and other template tags; check out: USP Pro Shortcodes, and also: USP Pro Template Tags.

      • Jon GorrieFebruary 23, 2014

        Great, thanks! I’ll try to do it all with shortcodes first :)

  2. New UserMarch 10, 2014

    I’ve enabled custom post types for submitted content, but when I try to preview a submitted post from the front-end, I get a 404 Not Found error. The submitted post appears in the Admin Area, but not on the front-end in the theme.

    • Jeff Starr

      Jeff StarrMarch 10, 2014

      Great question. How your theme displays custom post types depends on its included template files. In general, to display custom post types, a theme must include two files: archive-custom-post-type.php and single-custom-post-type.php, where “custom-post-type” refers to the name of the custom post type.

      For example, to display the USP custom post type, the two required theme template files would be archive-usp_post.php and single-usp_post.php. USP Pro includes basic templates for each of these files that you can add to your theme. They are located in the /templates/ folder, and will give WP something to use to display the custom post types.

      If the template files are included and the custom post types still aren’t displayed, then there is another thing to try. As explained in the Tools > Tips & Tricks, try simply visiting the WP Settings > Permalinks screen.. doing so is reported to fix a well-known WP bug with custom post types and getting them to be recognized.

  3. New UserMarch 10, 2014

    How do I display custom fields on all posts?

    • Jeff Starr

      Jeff StarrMarch 10, 2014

      Add this to your theme template file (anywhere inside the Loop):

      <?php echo usp_get_meta(false, 'name-of-custom-field-1'); ?>
      <?php echo usp_get_meta(false, 'name-of-custom-field-2'); ?>

      Then where it says “name-of-custom-field..” replace it with the name of the custom fields used by the images you would like to display. These are viewable from within the Edit Post screen, beneath the post content area. If you don’t see any panel that says “Custom Fields”, visit the Screen Options from the top-right corner of the page, where you can enable/disable its display.

      Then once you’ve seen how this basic example works, you can use any USP or WP template tags to display exactly what is required, anywhere in your theme. Here is a handy table of USP Pro template tags:

  4. Francisco BarberApril 24, 2014

    Hi, when displaying a post submitted with images, the images are stuck (pegadas, muy unidas) you can see it. How can separate it with margin?? Thanks

    • Jeff Starr

      Jeff StarrApril 24, 2014

      Try adding some CSS to your theme’s style.css file:

      .usp-image { display: inline-block; margin: 0 5px 5px 0; }


  5. Bill StilwellApril 2, 2015

    How would I get a form to display in a Genesis child theme?

  6. Regnard RaquedanAugust 5, 2015

    Is it possible to combine inputs? For example, I want the eventual post title to be “Post Title + Custom Field”. Where would I edit the code to make this happen?

    • Jeff Starr

      Jeff StarrDecember 19, 2015

      Hi Regnard,

      I know that this question was answered offline, but I wanted to post here online for the sake of others.

      Something like that (combined inputs) is not done automatically, but you can do it by including two custom fields in your form: one for the first part of the title and another for the second part. Then you can use a template tag like get_post_meta() to display the fields together, for example:

      $title_1 = get_post_meta(get_the_ID(), 'NAME_OF_CUSTOM_FIELD_1', true);
      $title_2 = get_post_meta(get_the_ID(), 'NAME_OF_CUSTOM_FIELD_2', true);
      echo '<h1>' . $title_1 . ' - ' . $title_2 . '</h1>';

      That would go in the Loop in your single.php file (or whichever theme file that is relevant for your goals. You can get the names of the custom fields on the Edit Post screen beneath the post content in the Custom Fields panel for any submitted post. Note that you’ll probably want to customize the output to display as intended (markup, etc.)

  7. New UserDecember 19, 2015

    I love USP and I have a question. Is it possible to assign a fixed featured image to every post that is submitted? We don’t want to let the user choose an image. There must be one and the same image set as featured every time the user submits a post. Thanks for your help!

    • Jeff Starr

      Jeff StarrDecember 19, 2015

      This is something that you can do without using any plugin. Just do something like this in the Loop:

      <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
          <?php $is_usp = get_post_meta(get_the_ID(), 'is_submission');
          if ($is_usp) : ?>
          <div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
              <h2><?php the_title(); ?></h2>
              <?php if (has_post_thumbnail()) the_post_thumbnail(); ?>
              <?php the_content(); ?>
          <?php else :
              // not a usp post
          endif; ?>
      <?php endwhile; else : endif; ?>

      That’s just an example to get you started, you’ll want to customize to suit your needs. More info on the Loop:

  8. Hamid EbadiJune 30, 2016

    Hi I used in my post content break line but it does not appear when I publish posts.
    //what I write in the text area


    // but what I got was
    apple orange House nice

    Break line did not translated :(
    what should I do?

  9. Tobias VogelOctober 7, 2016

    Hi Jeff,

    I have a “Member’s only” sub-page installed and want my USP Form only to be displayed for logged in users on this page. But it seems to me, that any visitor can visit the form through the permalink Am I wrong? And if not, how can I disable visitors to see the form through the permalink?

    Thanks in advance!

  10. Amelia SmallApril 16, 2017

    I have the USP Forms Pro installed as well as the Custom Post Type UI plugin, but how do I get a USP Form to post to a new custom post type instead of the standard WordPress “all posts” page?

    • Jeff Starr

      Jeff StarrApril 16, 2017

      You can add a hidden field to the form, for example:

      <input name="usp-custom-type" value="book" type="hidden" />

      ..would add a CPT of “book”. Here is complete infos on adding Custom Post Types with USP Pro.

      • Amelia SmallApril 16, 2017

        So I did that… but it’s not posting the fields… only the content box. Do I need to edit the CPT template to post the field submissions as well?

        This is the USP form page:

        This is the CPT once submitted:

      • Jeff Starr

        Jeff StarrApril 16, 2017

        Basically, yes. By default, most theme templates don’t display any custom fields (things like “dog name”, “breed”, “age”, and so forth). So as you suggest, you can either edit the CPT template to display the fields (using template tags), or you can use the free Helper Plugin to automatically display whichever custom fields you specify.

Please log in to post a new forum topic.