WordPress.org

Forums

Get the Image
get_the_image not getting image(s) from gallery ? (5 posts)

  1. belgianwolfie
    Member
    Posted 3 years ago #

    got this code

    <div class="thumbs">
            <?php if ( function_exists( 'get_the_image' ) ) {
    	    echo "tester";
    	   get_the_image('width=150&height=150&image_scan=true' );
    	 } ?>
           </div>

    In my posts, I don't have any featured image set, and no images inside my post.
    I do have an image gallery 'attached' to every post tho.
    Is get_the_image() not able to sniff attached image galleries to get an image from there?
    Note : The image galleries are attached to each post, not embedded (as a gallery) inside the post.

    Thanx

    http://wordpress.org/extend/plugins/get-the-image/

  2. Preeminent
    Member
    Posted 3 years ago #

    I too am having this same exact issue. How can we go about getting this to work?

  3. Preeminent
    Member
    Posted 3 years ago #

    ok, well I'm getting somewhere with

    <?php
                      if ( has_post_thumbnail() ) {
                      the_post_thumbnail();
                       }
    				   else
    				   {
    					get_the_image( array( 'image_scan' => true ) );
    				   }
    
                      ?>

    But the thumbnail image isn't being styled by my css like the other thumbails. In other words, I have some posts with a featured image, and for posts with no featured image, I'm using this plugin. Any suggestions on styling?

  4. Preeminent
    Member
    Posted 3 years ago #

    Is there something like get_the_image( array( 'thumbnail_scan' => true ) ); that I can use? Or something similar?

  5. Preeminent
    Member
    Posted 3 years ago #

    So I'm now using:

    <?php
                      if ( has_post_thumbnail() ) {
                      the_post_thumbnail();
                       }
    				   else
    				   {
    					get_the_image( array('size' => 'thumbnail'));
    				   }
    
                      ?>

    But still no fix for unstyled thumbnails, wrong size thumb, and now the post's main image is completely missing. If you click on the post, the main image is now gone. http://dependablecarcompany.com and if you click on the post, "1991 GMC Sierra", you'll see what I'm talking about. It's thumbnail isn't right, and when you actually click to view the post, the main large image is gone.

    Is there anyway I can get a few tips on fixing these issues? I really would this to work!

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Get the Image
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.