How do i make my wordpress the_excerpt code display an image

Discussion in 'PHP' started by VeryCheaptemplates, Mar 16, 2008.

  1. #1
    Im creating a magazine style theme and i want short excerpts on the front page to display image and the text wrapped around it.
    Does anyone know how to do this?

    Ive activated the excerpt reloaded plugin but dont know how to edit it.

    Ive also downloaded and activated this plugin "Excerpt Thumbnails"
    http://www.wpstar.com/plugins/excerpt-thumbnails/

    but it says to place
    ID); ?>
    PHP:
    in the loop. What part of the loop?

    Please help. thanks
     
    VeryCheaptemplates, Mar 16, 2008 IP
  2. VeryCheaptemplates

    VeryCheaptemplates Active Member

    Messages:
    486
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    60
    #2
    Help anyone pls?
     
    VeryCheaptemplates, Mar 16, 2008 IP
  3. stoli

    stoli Peon

    Messages:
    69
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #3
    It looks like the examples on http://www.wpstar.com/plugins/excerpt-thumbnails/ are broken. They should look like:

    ...place this piece of code where you want the thumbnail to appear:
    <?php exthumb($post->ID); ?>
    PHP:
    and

    ...The following code snippet would display the first image only and apply an inline style of “float: right”.
    <?php exthumb($post->ID, "style=\"float:right;\"", false); ?>
    PHP:
    Use this code in a template file that displays excerpts, for example archive.php.
     
    stoli, Mar 16, 2008 IP
  4. VeryCheaptemplates

    VeryCheaptemplates Active Member

    Messages:
    486
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    60
    #4
    Thanks stoli, it was able to get one image to show up.
    You see this excerpt it being used on my index page to display 8 posts in excerpts (like magazine style). Its not a loop persay,

    I have this code
    <?php $count = 0; $flag= 1; ?>
    		<?php if (have_posts()) : ?>
    		<?php while (have_posts()) : the_post(); ?>
    			<?php switch ($count)
    			{
    			case 0:?>
    PHP:
    then i have the same code for case 1: to case 8.

    The image only shows up in one post, the rest just show the green border for the image as a dot to the left

    Here is the link

    http://eniolafunsho.org/interior/
     
    VeryCheaptemplates, Mar 16, 2008 IP