WordPress.org

Ready to get started?Download WordPress

Forums

Using get_post_meta + timthumb (2 posts)

  1. qzplx
    Member
    Posted 4 years ago #


  2. qzplx
    Member
    Posted 4 years ago #

    Hi Guys,

    Would like to ask for solution.

    My theme images was grab from custom fields.

    <div class="img_th"><a href="<?php the_permalink() ?>"><img src="<?php print (get_post_meta($post->ID, 'thimage_value', $single = true)) ? get_post_meta($post->ID, 'thimage_value', $single = true) : get_bloginfo('template_directory').'/img/60x60.gif' ?>" alt="<?php the_title(); ?>" /></a></div>

    I would like to ask how to merge it with timthumb code ?
    I try to put this but its failed;

    <div class="img_th"><a href="<?php the_permalink() ?>"><img src="/include/timthumb.php?src=<?php print (get_post_meta($post->ID, 'thimage_value', $single = true)) ? get_post_meta($post->ID, 'thimage_value', $single = true) : get_bloginfo('template_directory').'/img/60x60.gif' ?>" alt="<?php the_title(); ?>" /></a></div>

    And dont know how to add in last bracket:
    &w=60&h=60&zc=1

    Any idea how to modified this ?

Topic Closed

This topic has been closed to new replies.

About this Topic