WordPress.org

Ready to get started?Download WordPress

Forums

User Submitted Posts
[resolved] Images not included in post (25 posts)

  1. thegoosenet
    Member
    Posted 1 year ago #

    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.

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

  2. Jeff Starr
    Member
    Plugin Author

    Posted 1 year ago #

    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:

    http://codex.wordpress.org/The_Loop
    http://codex.wordpress.org/Template_Tags

  3. thegoosenet
    Member
    Posted 1 year ago #

    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.

    Thanks,
    Laurie

  4. magrobel
    Member
    Posted 1 year ago #

    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.

  5. thegoosenet
    Member
    Posted 1 year ago #

    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.

  6. magrobel
    Member
    Posted 1 year ago #

    Update your WP to 3.5 version.

  7. thegoosenet
    Member
    Posted 1 year ago #

    It is already updated.

  8. Jeff Starr
    Member
    Plugin Author

    Posted 1 year ago #

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

  9. thegoosenet
    Member
    Posted 1 year ago #

    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.

  10. Jeff Starr
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  11. thegoosenet
    Member
    Posted 1 year ago #

    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.

  12. zedbiz
    Member
    Posted 1 year ago #

    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.
    Thanks
    Jack

  13. LifesABargain
    Member
    Posted 1 year ago #

    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 :)

  14. Jeff Starr
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for the recommendations, LifesABargain! :)

  15. stuu3270
    Member
    Posted 1 year ago #

    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.

  16. Jeff Starr
    Member
    Plugin Author

    Posted 1 year ago #

    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! :)

  17. mikem1986
    Member
    Posted 1 year ago #

    Hi guys

    To add padding and alignment to the pictures uploaded just take the code above and add in the relevant styles like so

    <?php if (function_exists('usp_post_attachments')) {
    usp_post_attachments('thumbnail', '<img src="', '" alt="" align="left" style="padding:0px 10px 10px 10px" />', 99);
    } ?>

    I personally put it just above the_content as I like the images in the top left hand corner on my site but if you want it top right change "left" to "right" and padding to "padding:0px 0px 10px 10px"

    Hope this helps!

    Mike

  18. maximusmccullough
    Member
    Posted 1 year ago #

    I made a video tutorial for those of you who are having trouble seeing your images. User Submitted posts

  19. Cesily
    Member
    Posted 1 year ago #

    Not sure if this is something I did or not, but here is my problem.

    Only one picture will upload, when you click the "add another image" button, it takes you to the top of the page and will not let you add anymore images.

  20. Jeff Starr
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Cesily, please check the setting for max number of images, which it sounds like is currently set to "1". Also if you've recently upgraded, you may need to clear your browser cache to allow the updated JavaScript file to load up.

  21. Handoko
    Member
    Posted 1 year ago #

    Thanks maximusmccullough for the video tutorial. It's really helpful.
    Thanks Jeff Starr for this amazing plugin.

  22. Cesily
    Member
    Posted 1 year ago #

    I have done both of those, still have same problem. Also, now have a conflict with comments not showing. I may have messed something up in the code while trying to fix the picture issue. I have changed themes and still have issue, will try and deactivate plugin and see if comments will work. I will return to this issue when comments function correctly.

    thanks.

  23. Handoko
    Member
    Posted 1 year ago #

    Confirmed. I set the max number of images to 2, but I can only submit 1 image.

  24. robmorin
    Member
    Posted 10 months ago #

    I am having issues seeing the image still... after I upload it via the form it does not show up in the media gallery.

    I am using the theme "Photographic" Only the text is there, image is no where to be found. Any ideas?

    Thanks

  25. Jeff Starr
    Member
    Plugin Author

    Posted 10 months ago #

    Just to let people know that I am aware of this issue and will be looking into it for the next update. Thank you to everyone for the feedback.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic