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

  1. xtrapsp
    Posted 2 years 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?




    For those of you who wish to do the same:

    I put this in Single-post.php

    if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
  2. Jeff Starr
    Plugin Author

    Posted 2 years 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


No tags yet.