Support » Plugin: User Submitted Posts » Still having issues getting a "template tag" or "custom field" for images

  • Resolved thegoosenet


    I have tried again to do as the developer suggested. I included:
    <!–?php $images = usp_get_post_images(); foreach ($images as $image) { echo $image; } ?–>
    in The Loop.

    That is, this statement appears in the theme index.php file as follows

    <?php if ( have_posts() ) {

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

    I still don’t get anything in the post to link it to the image. The image uploads, but the post does not show a “template tag”.

Viewing 11 replies - 1 through 11 (of 11 total)
  • I don’t know if this is the issue, but you have to remove the exclamation point and double-dashes so it’s not a comment. As shown in your post the code is incorrect in this part:


    You need to just write it like this:


    and same for the end too:


    should be


    I hope it helps you

    Ok, I changed it to look like this:

    <?php if ( have_posts() ) {

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

    Is the syntax now correct?

    It still isn’t working.

    Hmm.. I don’t know but the plugin is working fine on my site. I use the template tags included with the plugin to display the images in posts. I use this:

    <?php if (function_exists('usp_post_attachments')) usp_post_attachments(); ?>

    there are ways to customize in the readme file.

    See, maybe there is some basic thing I am not understanding.

    Exactly where did you put this statement? in the page that calls the [user-submitted-posts] or in The Loop? I tried putting it in the page, but that did not work.

    It’s unfortunate that not all of us are familiar with and know how to use PHP code. I am not sure that it should be a prerequisite for using This is the first time I have been truly stuck using a plugin.

    Sheesh, why not study a little PHP code and learn it then? Or maybe hire someone to help? Or find a different plugin? So many solutions but it’s up to you to make it happen.

    Plugin Author Jeff Starr


    Hi thegoosenet, that code should be placed in the loop, for example single.php, index.php, etc. You don’t need to learn PHP to use this plugin, but you should be familiar with theme files and copying/pasting template tags. For the next version, I will update the readme.txt with info about the prerequisites to using the plugin, along with further details on how to implement, display images, etc. Thanks for the feedback.

    Thank-you Jeff.

    As to your comment Allan–There is a steep learning curve to all programming languages. It’s not how I want to spend my time. As far as finding another plugin, don’t think I haven’t looked. As far as I have been able to find out, this is the only game in town that does both–comments and pictures. Which is why I think Jeff should work on making it more user friendly.

    Okay, one step forward. I am looking at a test user post that I submitted. Under custom fields I see the URL for the image. I have also looked at the code you provide in your custom field tutorial. Finally, I have looked at your usp_get_post_images(), which is in The Loop on my site.

    As far as I can tell, usp_get_post_images() is mention to generate the code that looks like:

    This is the part that is not happening–that code is not being generated in the post.

    Is there something more that I should be doing?

    PS, it seems that when I sent the last email, the is resolving to the link.

    It should read “As far as I can tell, usp_get_post_images() is mention to generate the code that looks like:

    <?php $images = usp_get_post_images(); foreach ($images as $image) { if (function_exists(‘usp_post_attachments’)) usp_post_attachments(); } ?>

    Plugin Author Jeff Starr


    8 months later no activity.. gonna go ahead and close the thread. Please open a new thread if any further questions or concerns, thank you.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Still having issues getting a "template tag" or "custom field" for images’ is closed to new replies.