WordPress.org

Ready to get started?Download WordPress

Forums

User Submitted Posts
[resolved] Automatically display images in post (5 posts)

  1. mathiasppc
    Member
    Posted 8 months ago #

    Thanks for a great plugin!

    I'm having a hard time displaying the images in the posts. I know that I need to do something with custom fields, but not sure how. Could you please explain how this is done? I just want the images as 'medium' one after another in the post content.

    Cheers

    -Mathias

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

  2. tgiokdi
    Member
    Posted 7 months ago #

    I'm looking for this same ability, there's some custom functions in the readme, but I really don't want to lock into this one plugin, and would like to have either the ability to stick gallery short code into the post or (better!) have the plugin automatically insert the images into the posts with a size I specify on the settings page.

  3. Jeff Starr
    Member
    Plugin Author

    Posted 6 months ago #

    Hi Mathias, basically there are several USP template tags for displaying submitted images, which are attached as custom fields to posts. One example, you could add this tag to the WP Loop:

    usp_post_attachments();

    Then there are parameters that can be specified to indicate size, set the number of images, and prepend/append text/markup before and after the image URL(s):

    usp_post_attachments('thumbnail', '<img src="', '" />', false);

    That will display all images attached to the current post, displayed as an image. More info on this tag (and others) in /library/template-tags.php.

    @tgiokdi: good news! submitted images are also inserted into the WP Media Library, so no need to use USP tags at all -- you can use any WP tags needed to display the content.

    Also should mention the Pro version of the plugin that does all of this and much more either automatically or with shortcodes and plugin settings: http://plugin-planet.com/

  4. tgiokdi
    Member
    Posted 4 months ago #

    Right, but it would be more code to add to any template changes, would be best if the image was inserted into the post or if the plugin permitted to have text pre-pended or appended to the post so we could throw in our own gallery shortcodes

  5. Jeff Starr
    Member
    Plugin Author

    Posted 4 months ago #

    That's a great idea that I'll try to implement in a future update. Thanks for the feedback

Reply

You must log in to post.

About this Plugin

About this Topic

Tags