Support » Plugin: User Submitted Posts » Images not included in post

  • Resolved thegoosenet


    The image gets uploaded, but it is not included in the post. Only the text shows in the post. Your advice mentions template tags, but it is not clear where to put this. I put the following in the Member Page:
    <!–?php $images = usp_get_post_images(); foreach ($images as $image) { echo $image; } ?–>

    Is this where it goes? Is it the right code? I really need an answer quickly as my blog is live.

Viewing 15 replies - 1 through 15 (of 24 total)
  • Plugin Author Jeff Starr


    Yes, that looks like the correct code to get you started, but you will want to customize according to your specific needs. In your theme file(s), place that code anywhere in the WP loop. I recommend setting things up on a test server before rolling it out live, especially if you are new to WP. Here are some links that should help:

    I’m sorry, but I still don’t get it. I looked at both your links. Are you saying that I should put the following in the index.php file?

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

    I did this. I still a not getting the image in the post. It uploads, yes, but only the text appears in the post. I would really like to make this work.

    By the way, when I say it’s live, I mean that members have asked me how to post pictures and I can’t give them an answer.


    You can edit the new pending post and then at the “Insert Media” button select the images uploaded to that pending post and insert them to that post and/or set one of them as featured image.

    As far as I can tell, there is no way to know what image is uploaded to which post. Anyway, I am not sure I want to become that involved in someone else’s guest post. It is too bad I can’t resolve this. Would be a great plugin if it worked.

    Update your WP to 3.5 version.

    It is already updated.

    Plugin Author Jeff Starr


    The plugin works fine, and will be updated to be even better by the end of the day 🙂

    I was quite surprised to see that my question is now msrked as resolved. This is not true. Per your previous comment, I re-installed the plugin: Version 20130104. I still can’t get the image upload feature to work. The image is uploaded, but there is no link between the post and the image.

    Plugin Author Jeff Starr


    The image is uploaded, but there is no link between the post and the image.

    As explained in the readme.txt file:

    “NOTE that this plugin attaches uploaded images as custom fields to submitted posts. Attached images are not displayed automatically in posts, but rather may be displayed using template tags, either WP’s built-in tags or the USP template tags (explained below). This provides maximum flexibility in terms of customizing the display of uploaded images.”

    In your first post, you say that “the image gets uploaded, but it is not included in the post.” This is normal plugin functionality, so I marked the topic as resolved. Unfortunately there isn’t an “unresolved” button, but you are free to open a new thread if there are other issues.

    But that is just it. I type in some text, I upload a picture, I submit it. When I review the post all I see is the text. I don’t see anything resembling a “tag” in the post.

    I am sure there is something I am not understanding, but I would really like to make this work.

    Could you please dummy this down for me.

    I think that the issue is 90% of WordPress users (me included) have no idea how to use template tags.
    Therefore to get this plugin to work – we have to learn something new – and we don’t know where to learn it.
    We want something plug’n’play.
    Click some options checkboxes is fine.
    But to change code – that is harder.

    Asking people to mess with theme files, coding and all that jazz is unnecessary. A plugin is supposed to “plugin” and work.

    Recommendations for the Plugin Author:

    Forget having multiple images – allow one image and have it be visible in the post and featured image. Allow image location can be chosen from the submission area (radio buttons for top Left Align, Center, Right Align). Not only should the image be visible in the admin post field, but the image should also be automatically uploaded as the featured image as well.

    Make it easy for everyone 🙂

    Plugin Author Jeff Starr


    Thanks for the recommendations, LifesABargain! 🙂

    I have the same issue. It is frustrating to say the least. I too want a plugin that can be installed, set up then used – simple.

    I am surprised that the plugin author cannot or is reluctant to engage more and resolve this issue.

    I am going to look for another plugin, unless there is an easy solution that involves minimal coding. i.e. a dummy’s guide of what to add and where to make this work.

    Plugin Author Jeff Starr


    Hi stuu3270,

    Thank you for the feedback, I’ve added this request to the list for the next update! 🙂

    In the meantime, here is but one way of displaying the images:

    1) Open your theme’s single.php file
    2) Add the following code just beneath the_content()

    <?php if (function_exists('usp_post_attachments')) {
    usp_post_attachments('thumbnail', '<img src="', '" alt="" />', 99);
    } ?>

    3) Save the changes and upload to the server

    A couple of notes: the USP plugin provides some other tags you can use as well, and WP itself features numerous tags and methods of displaying attachments and media items. Uploaded images attached to posts are also added to the Media Library, which opens up even more possibilities.

    I hope this helps! 🙂

Viewing 15 replies - 1 through 15 (of 24 total)
  • The topic ‘Images not included in post’ is closed to new replies.