Title: sqlbytemladen's Replies | WordPress.org

---

# sqlbytemladen

  [  ](https://wordpress.org/support/users/sqlbytemladen/)

 *   [Profile](https://wordpress.org/support/users/sqlbytemladen/)
 *   [Topics Started](https://wordpress.org/support/users/sqlbytemladen/topics/)
 *   [Replies Created](https://wordpress.org/support/users/sqlbytemladen/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/sqlbytemladen/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/sqlbytemladen/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/sqlbytemladen/engagements/)
 *   [Favorites](https://wordpress.org/support/users/sqlbytemladen/favorites/)

 Search replies:

## Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to Custom Field show image/thumbnail](https://wordpress.org/support/topic/how-to-custom-field-show-imagethumbnail/)
 *  Thread Starter [sqlbytemladen](https://wordpress.org/support/users/sqlbytemladen/)
 * (@sqlbytemladen)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/how-to-custom-field-show-imagethumbnail/#post-976718)
 * This is the code from the mentioned timthumb plugin:
    `<?php if ( get_post_meta(
   $post->ID,'image', true) ) { ?>` And this is yours:
 *     ```
       <?php
       $images = get_children(
       array(
       	'post_parent' => $post->ID,
       	'post_status' => 'inherit',
       	'post_type' => 'attachment',
       	'post_mime_type' => 'image',
       	'order' => 'ASC',
       	'orderby' => 'menu_order'
       	)
       );
   
       if ( $images ) {
       $count = 1;
       foreach ( $images as $id => $image ) {
       	if( $count === 1 ) {
       		$img = wp_get_attachment_thumb_url( $image->ID );
       		$link = get_permalink( $post->ID );
       		print "\n\n" . '<div><a href="' . $link . '"><img src="' . $img . '" alt="" /></div>';
       	}
       	$count++;
       }
       }
       ?>
       ```
   
 * If i delete that timthumb code, it gaves me an error, and if i change image to
   image2 it doesn’t work.
    But if i leave everything like it is, it try to display
   image from timthumb (give broken image), and then display image. So.. i don’t
   know how to fix it 😐
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [How to Custom Field show image/thumbnail](https://wordpress.org/support/topic/how-to-custom-field-show-imagethumbnail/)
 *  Thread Starter [sqlbytemladen](https://wordpress.org/support/users/sqlbytemladen/)
 * (@sqlbytemladen)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/how-to-custom-field-show-imagethumbnail/#post-976713)
 * mfields your the man ! 🙂 I used the link you provided on other thread.
    It displays
   image that i state in custom field, can you please just tell me what part should
   in your code so that it displays images from custom field with name **image2**
   because **image** is already used for that timthumb plugin.
 * Again thanks, you helped me a lot.

Viewing 2 replies - 1 through 2 (of 2 total)