WordPress.org

Ready to get started?Download WordPress

Forums

"Post Image" not working WordPress 2.1.3 (3 posts)

  1. tom_de_schlong
    Member
    Posted 6 years ago #

    I am trying to get the "Post Image" Plugin by Kaf Oseo up and running on a site and it isn't working.

    I am using WordPress 2.1.3 and it is the only plugin activated.

    I have added the following code to page.php:

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
      <div class="post" id="post-<?php the_ID(); ?>">
        <h2>
          <?php the_title(); ?>
        </h2>
        <div class="entry">
          <div class="post_image">
            <?php post_image(); ?>
          </div>
          <?php the_content(); ?>
        </div>
      </div>
      <?php endwhile; endif; ?>

    The site is then refusing to load past <?php post_image(); ?>, everything loads fine up to this point but no further.

    Thanks

    Tom

  2. tom_de_schlong
    Member
    Posted 6 years ago #

    I could'nt get this to work with my install so I am instead using the following code to achieve the same affect.

    <?php // This Function Powers the thumbnail image that is used in my portfolio
    function return_ThumbNail($Thumb) {
    if (preg_match('/<img[^>]*>/',$Thumb,$Treffer)) {
    $Thumb = preg_replace('/(<img ).*(src=\'[^\']*\').*( \/>)/','$1$2$3',$Treffer[0]);
    $Thumb = preg_replace('/(.[^.]* \/>)/','.thumbnail$1',$Thumb);
    } else {
    $Thumb = false;
    }
    return $Thumb;
    }
    ?>

    Tom

  3. juneallison
    Member
    Posted 6 years ago #

    Tom,

    Could you provide more information on how you are placing this function in your code? I can't seem to get it working.

    thanks!

    june

Topic Closed

This topic has been closed to new replies.

About this Topic