• Resolved gegresh

    (@gegresh)


    Hi there. I’m working on a heavy metal magazine site using WordPress and I’m looking for a solution. Every article on the site has a corresponding image. I’d like to be able to easily associate those images with the posts they correspond to so that I can include the image automatically with the posts (and on the archive/index pages) i.e. I’m looking for some kind of function that would get the image that corresponds to an article. Some wonderful mystical function like “getImage()”. It would be oh so nice if it were that simple.

    I understand that I might be able to accomplish something like this with custom fields, but it would be even nicer if I could use the built-in image uploading, since the site will have multiple contributors uploading their own graphics (album art, etc).

    Is this the kind of thing that would be easier with a plug-in? Thanks for the help.

Viewing 15 replies - 16 through 30 (of 30 total)
  • How does this differ from the Post Icons plug-in?

    Welby, I looked at that plugin (as a possible solution for gegresh) before cooking up mine. I’d say the main ‘differ’ here, beyond the scope of being WP2-specific, is the further automation in Post Image. Just upload your image and you’re done.

    Hi Kafkaesqui
    Your plug-in is exactly what I have been hunting for, but there is one snag. I’m running WP 1.5.3. I am going to be upgrading soon, but would it be possible for you to make this plug-in work under my version?
    My site goes live on Friday 8-|

    Thanx
    Trevor

    I bit the bullent and upgraded. Thanx anyway.

    tvdwalt, I’m glad you stepped up to 2.0. Hope you like the plugin.

    For those still at 1.5.x and who cannot make the move as tvdwalt did, Welby’s suggestion above is a good one (I can’t downgrade my plugin without cutting out the main reason I wrote it, which is to hook into the image attachment features of WordPress 2).

    Tried using this in a double loop and for some reason it will only pull the thumbnails for the first loop but not the second. Otherwise it works excellently. Any ideas? Here’s the code I’m using for the second loop:

    <?php $my_query = new WP_Query('cat=7&showposts=2'); ?>

    <?php while ($my_query->have_posts()) : $my_query->the_post(); ?>

    <div class="post" id="post-<?php the_ID(); ?>">

    <div class="entry">

    <div class="postthumb"><a href="<?php the_permalink(); ?>"><img src="<?php post_image('', true, false); ?>" /></a></div>

    <div class="posttext">
    <h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h3>
    <h4><?php the_excerpt(); ?></h4>
    </div>

    <div class="clear"></div>

    </div>

    </div>

    <?php endwhile; ?>

    This is so great!

    Do you have a plugin that can help me in something like this http://wordpress.org/support/topic/74472?replies=1 ?

    This has been the most helpful plugin out of the 10 I’m using on a website I’m currently creating (it saved me from writing it!). Really Kaf, awesome job. I know the thread is old but I had to comment on it. I’m also using your post template-by-category, get-a-post and add-link-attribute plugins. I’m going to test out your download manager plugin sometime today.

    P.S.
    It wasn’t until this past week I learned how to read/understand the command structures and what not of PHP. I saw how you called the image via “get_post_custom” and used it to create custom meta fields for other media types and information as well! ^_^

    Hi Kaf — After looking at your post-image plug-in more and figuring out how to get the most out of it, there is absolutely no reason for the following in your code:

    40 if(!in_the_loop())
    41 return;

    It may be more appropriate to check if $post has a valid value, as it is the only real dependency in the function.

    Just my two cents! Thanks for the download manager plug-in — it’s working super!

    This plugin works only with the original image uploader or also with IImageBrowser ?

    Hello

    First let me say this plug in is awesome!

    Even though I have gotten it working I am still somewhat a novice with it as well as actually using the WP CP to upload the images.

    Until now I have just been FTP(ing) them to the server and linking to them manually in each post.

    So this plug in offers me a great solution for this.

    Though I am curious.

    I currently have the images in the posts linked to external sites and was wondering if there is a way to make this a possibility somehow with this plug in?

    Also if this is possible, is there a way to add rel=”nofollow” to the link for the image?

    I realize this may not easy to accomplish as this would also require adding a url in the WP CP when the image is uploaded and somehow relating it to that specific image as well.

    Just curious.

    Thanks in advance for any assistance.

    First of all, I would like to thank the writer of post-image plug in for the time he spent on this script and sharing with us. I was not able to use it so far, But I am sure many do. I was hoping that the writer or anyone with a knowledge of it can assist me and answer a few questions that I have as I only have basic knowledge of scripting.

    Our website is a sporting website and the url of front page is:
    http://www.iranfootballonline.com

    As you can see, we have word press showing up in the body of our front page, including the images. We use FCKeditor to post images.
    What I want to do is to make the images appear as thumbnails in the latest news section with full image appearing when one clicks on a title to read the whole news. Something like the following:
    http://www.iranfootballonline.com/revised

    Please notice that I want the images to appear where there is an X as thumbnails of around 120*100 pixels. (Please disregard the text malalignment.)

    Now, for our current front page we use the following command to call the post content and the images:
    $textfive = substr((strip_tags($rowfive[‘post_content’],'<img>,’)),0,380) ;
    echo ” “.$textfive.”… <span class=\”smallfont\”>more …</span>” ;

    This is a strip tag. the problem is, I cant separate the images from the text. they go together.

    Now to my question. Does post-image do what I aimed to do as explained above?

    If yes, I have went through the instructions. Uploaded the post image php under appropriate place and it shows up fine under plug ins and I can activate it. My problem starts there. There is a talk about “The Loop”. I read the article about it, but still I have no clue where I can find it. When that issue is solved, where and what do I put the command that makes thumbnails of those images corresponding to each post?

    I had a technical person who did stuff like that for me. I learned quite abit of scripting in the past few months thanks to people like you. But I can neither get hold of my technical person, nor my knowledge has become sufficient enough to answer the above questions.

    I would really really appreciate any help that I can get in this matter.Thank you so very much.
    Sol

    We are using wordpress version 2 and the template we use is connections 1.0. I dont know if with our setup, template matters or not at all.

    Here’s how I’ve have incorporated the post-image plugin in my index page. http://wordpress.pastebin.ca/185105

    Hey,
    Im trying to take the same output of post-image and apply it to an RSS tag.
    However, <?php post_image(); ?> does not seem to work with RSS.
    Is there another way to call it from wp-rss2.php?

    Just want to thank you for this awesome plugin. Currently on my “TOP 5 WP plugins” chart.

    Really great!

Viewing 15 replies - 16 through 30 (of 30 total)
  • The topic ‘linking images to posts’ is closed to new replies.