Viewing 2 reply threads
  • Author
    Posts
    • #4261
      cosmocanuck
      Member

      Hi! I’m using the method outlined here to add my custom image:

      https://piklist.com/user-guide/tutorials/displaying-images-upload-field/

      But I want to show my image at the same custom thumbnail size for all posts (I’ve set up one called “poster-thumb” in my functions.php). I’ve looked around the web and also searched the Piklist support posts, but can’t find the answer. Can you advise? Thanks!

    • #4262
      cosmocanuck
      Member

      Never mind, I figured it out – I used wp_get_attachment_image instead! Specifically,

      $image_ids = get_post_meta($post->ID, 'poster');
      				foreach ($image_ids as $image)
      					{
      						$myupload = get_post($image); 						
      						echo  wp_get_attachment_image( $image, 'poster-thumb' ); 
      					}

      Not sure if this is worth adding to the user guide or if it’s more “general wordpress knowledge”… but glad I sorted it out.

    • #4263
      Steve
      Keymaster

      @cosmocanuck– Glad you figured it out!

      Since Piklist does everything the WordPress way, in most cases you can use standard WordPress functions to solve your issue. So don’t only look on the Piklist.com site for your answers, any WordPress tutorial on getting images would work.

      Closing ticket.

Viewing 2 reply threads
  • The topic ‘Specify image size in template?’ is closed to new replies.