• Resolved ElSebas

    (@elsebas)


    Here is the thing, I’ve created 2 new custom fields for my images one for a featured post and the other for the normal posts so in my homepage the featured images are 675X400 and the normal are 300X200, the problem is when I call the archives by month obviously wordpress call the archives template:

    <div id="view_cat">
     <h1><a  href="<?php the_permalink() ?>"><?php the_title(); ?></a></h1>
     <div class="feat_izq">
      <img src="<?php echo get_post_meta($post->ID, 'thumbnail', true)  ?>" alt="Post Image" class="img_catfeat" />
     </div><!--Finish feat_izq-->
     <div class="feat_der">
      <?php the_content(''); ?>
      <p><a href="<?php the_permalink() ?>" rel="leer">Leer mas</a></p>
     </div><!--Termina feat_der-->
    </div><!--Se cierra view_cat-->

    The problem is in the image im calling the one that has the ID thumbnail, and only shows that image, but I want to call both images the thumbnail and the featured one. So any ideas??

Viewing 3 replies - 1 through 3 (of 3 total)
  • Purab

    (@wordpressapi)

    Use the following code.

    get_the_post_thumbnail($id, 'thumbnail');     // Thumbnail
    get_the_post_thumbnail($id, 'medium');        // Medium resolution
    get_the_post_thumbnail($id, 'large');         // Large resolution
    
    get_the_post_thumbnail($id, array(100,100) ); // Other resolutions

    Thread Starter ElSebas

    (@elsebas)

    Ok I dont get it sorry :(, where do I put that,

    <img src="<?php echo get_post_meta($post->ID, 'thumbnail', true)  ?>" alt="Post Image" class="img_catfeat" />

    I do what?

    <img src="<?php echo get_post_meta($post->ID, array(Featured,thumbnail), true)  ?>" alt="Post Image" class="img_catfeat" />

    Sorry could you be more specific

    Thread Starter ElSebas

    (@elsebas)

    Problem solved thanks!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Problem with images’ is closed to new replies.