Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Hi i am using the normal loop to get the post content. Objective is to show images or videos in the blog.

I tried the_content() for the loop but am getting the thumbnail image i belive, What i want is the original image should be there.

Here is the code

<?php if ( have_posts() ) :
              while ( have_posts() ) : the_post();
                   the_content();//by this am getting the medium sized images from the post content as it is uploaded through add media
              endwhile;
              endif;
        ?>

Now i want to show full size of the image for each post. How to do it.

can anybody help?

share|improve this question
add comment

2 Answers 2

up vote 3 down vote accepted

Since you say that your image is "uploaded through add media", you need to select the full sized image when you attach it to the post, not when you try to display it. You should even see in the markup that a smaller size has been chosen (by you).

Look over on the right side in the sidebar toward the bottom. You should see a dropdown that will let you choose "size".

share|improve this answer
1  
Thanks for the info. I didn't noticed for the past one month. This will be appropriate for me by this using the_content() alone i can able to show video as well as images without any conditional statement in my loop. +1 @s_ha_dum –  rram Dec 15 '13 at 15:54
    
If you have anything to say. Just say:) –  rram Dec 15 '13 at 15:56
    
Hi i have one doubt, Can i make pagination from this loop or should i use wp_query object then make pagination. Which is possible if you let me know this i'll ask a separate question based on that. Thanks @s_ha_dum –  rram Dec 16 '13 at 18:29
    
You can paginate any Loop, but how you do it depends on context. –  s_ha_dum Dec 16 '13 at 19:04
add comment

This outputs the Post Thumbnail/Featured Image in full size:

<?php
    if ( has_post_thumbnail())
    {
      $full = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'full' );
      echo '<img src="' . $full[0] . '">';
    } else {
      echo 'No post thumbnail.';
    }
  ?>
share|improve this answer
1  
Thanks for the code i'll try to use whenever i need this knowledge. +1 @luke –  rram Dec 15 '13 at 15:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.