Title: [Plugin: WP Super Cache] Thumbnail link bug
Last modified: August 20, 2016

---

# [Plugin: WP Super Cache] Thumbnail link bug

 *  [stormdude](https://wordpress.org/support/users/stormdude/)
 * (@stormdude)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-thumbnail-link-bug/)
 * Hi,
 * The WP Super Cache really makes my site zoom, but unfortunately I have some code
   that is getting mashed up when the WP Super Cache is enabled. I have the follow
   bit of code to link a thumbnail image:
 *     ```
       <?php while ( $connected->have_posts() ) : $connected->the_post(); ?>
       <li>
       <a href="<?php echo get_post_meta($post->ID, 'vendor_url_web', true);?>" target="_blank"><?php the_post_thumbnail('vendor-thumb');?></a>
       </li>
       <?php endwhile; ?>
       ```
   
 * When the code is rendered with WP Super Cache enabled, the first loop is fine
   but all other loops produce something like this:
 * `<a href<img src="http://www.amazon.com/" target="_blank"><img width="150" height
   ="45" src="http://www.mysite.com/us//wp-content/blogs.dir/4/files/2010/11/amazon.
   gif" class="attachment-vendor-thumb wp-post-image" alt="Amazon" title="Amazon"/
   ></a>`
 * As you can see, the opening portion of an image tag is being inserted into the
   anchor tag. If I static the image tag rather than using the the_post_thumbnail
   function, it works as expected, but when I use the_post_thumbnail `<img src=`
   replaces the equal sign after the href.
 * Any thoughts on a workaround? Help is much appreciated!!
 * Thanks,
 * Grant
 * [http://wordpress.org/extend/plugins/wp-super-cache/](http://wordpress.org/extend/plugins/wp-super-cache/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [stormdude](https://wordpress.org/support/users/stormdude/)
 * (@stormdude)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-thumbnail-link-bug/#post-2551529)
 * It looks like it’s the “wpsupercache_buffer” filter that is mangling my code.
   I’ve found a temporary workaround by comments out line 486 in wp-cache-phase2.
   php:
 * `$buffer = apply_filters( 'wpsupercache_buffer', $buffer );`

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: WP Super Cache] Thumbnail link bug’ is closed to new replies.

 * ![](https://ps.w.org/wp-super-cache/assets/icon-256x256.png?rev=3506220)
 * [WP Super Cache](https://wordpress.org/plugins/wp-super-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-super-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-super-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-super-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-super-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-super-cache/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [stormdude](https://wordpress.org/support/users/stormdude/)
 * Last activity: [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-thumbnail-link-bug/#post-2551529)
 * Status: not resolved