WordPress.org

Forums

User Submitted Posts
[resolved] Image included automatically in post (2 posts)

  1. xtrapsp
    Member
    Posted 1 year ago #

    Hey Jeff,

    I'm using the plugin to make it so users submit an image. Which is great but I want to know how to make the actual content the image rather than a featured image?

    Thanks,

    http://wordpress.org/plugins/user-submitted-posts/

    Edit:

    For those of you who wish to do the same:

    I put this in Single-post.php

    <?php
    if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
      the_post_thumbnail('large');
    }
    ?>
  2. Jeff Starr
    Member
    Plugin Author

    Posted 1 year ago #

    Actually in the plugin settings there is an option to display uploaded images as featured images, so no need to add any code. Then to display uploaded images in the post, use any of the provided template tags or any WP template tags. For example, as explained in the readme.txt, you can do something like this in the loop:

    <?php $images = usp_get_post_images(); foreach ($images as $image) { echo $image; } ?>

    That will display all images attached to the post. There are other tags and parameters to customize further to do just about anything.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • User Submitted Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.