WordPress.org

Support

Support » How-To and Troubleshooting » get the conent not showing pictures

get the conent not showing pictures

  • Hello..
    I m working in a loop and i need to make the thumbnails appear next to content but its not happening

    <?php
    			$content = get_the_content();
    			echo substr($content, 0, 200);
    			?>

Viewing 13 replies - 1 through 13 (of 13 total)
  • try exceeding the character limit with 2000 because 200 is too short to get image

    That worked.thanks! but how can i make the thumbnail small?

    you can mention your desired size in dashboard – setting – media and than select your size image at the time of upload

    I might want it big in main post the small here. so anyway for that?

    for that purpose you have to select featured image

    but how do i apply that small part to the code above?

    i want to class the img class. but its outputting it from get_the_content. how can i do that

    if you want to show two different size image you can only use featured image

    I tried that but it doesn’t show. :/

    Can you post a URL to illustrate the problem?

    are you trying the_post_thumbnail();
    for that you have to insert featured image
    is there any text also with yout image or you want to show only image if you want to get only image than the best way is to use featured image

    I have this page, which runs a loop on parent and its child. and displays all the child, with 500 char of the content along with title and picture. now the picture maybe large in real post but i want it small or thumbnail size of the page which i created, so they look pretty. As for now, the image size inside the post is being shown on the page
    p.s – that code in taken from research collectively. i am learning!

    You can add a css class to the image and define that class inline in loop.php.

    <img class=”tim” src=”website-url/wp-content/uploads/2012/08/driveway.jpg” alt=”” />

    <style type=”text/css”>
    .tim { width:50px;height:50px;}
    </style>

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘get the conent not showing pictures’ is closed to new replies.