Forums

Show a image and strip some text how to? (6 posts)

  1. blaatje123456
    Member
    Posted 3 years ago #

    Hi all,

    I want to show some snippits of my blog posts with an image, and strip some text from the discription.

    this is the code i have and what worked:

    <div id="text1">
    <?query_posts(array(
       'showposts' => 4,
       'offset' => 9,
       'random' => true,
       'category__not_in' => array(95,145,226),
    ));?>
        <div>
    <table width="100%" border="0">
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
      <tr>
        <td><img src="<?php echo bloginfo('template_url'); ?>/thumb.php?src=<?php echo get_post_meta($post->ID, "image", $single = true); ?>&amp;h=57&amp;w=100&amp;zc=1&amp;q=95" alt="<?php the_title(); ?>" class="th1" />            </td>
        <td><a title="Link to article <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a>
        <p>
        <?php the_content();?>
        </td>
      </tr>
    <?php endwhile; ?>
    </table>
        </div>
    <?php else: ?><p>No messages!</p><?php endif; ?>
    </div>

    The problem:

    1. How to limit the text (for example) 20 words? I have take a closer look to the excerpt plugin, but that doesn't work for me. This is because i'm using this script also on my frontpage. Don't know how to fix this?

    2. How to show only the first image of the post?
    Now at the frontpage the script shows the right image, but if i go to the next page, the script shows all the images, without thumbnailing them.

    So experts, eat your heart out!

  2. blaatje123456
    Member
    Posted 3 years ago #

    hello???

  3. idovbenko
    Member
    Posted 3 years ago #

    i am looking for the same thing. nobody here seems to be able to help. I am looking for a plugin that will take say last 3 posts and feed them on a different webpage on my site with say about 20 characters and a small picture with a link direct to that post on the blog.

  4. blaatje123456
    Member
    Posted 3 years ago #

    yes, i agree with you! It seems nobody here seems to be able to help, and this forum looks to be inactive. So, people..... tell us please the answer!

  5. blaatje123456
    Member
    Posted 3 years ago #

    hello?

  6. blaatje123456
    Member
    Posted 3 years ago #

    someone?

Topic Closed

This topic has been closed to new replies.

About this Topic