<!--more--> tag ignored (3 posts)

  1. Leon
    Posted 9 years ago #

    Hey there,

    On my site http://www.virbskins.co.uk, I have a page which displays every first post of four different categories. I did this with the get_post script I found here.

    <?php $lastposts = get_posts('numberposts=1&category=3');
            foreach($lastposts as $post) :
    	  <h2 class="first_column_head1"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    	  <div class="post_content">
    	    <?php the_content(__('Read more...')); ?>
          <?php endforeach; ?>

    Now I read on this page, that the <!--more--> tag doesn't work if there's only one post. Is there some way I can hack this?


  2. Samuel B

    Posted 9 years ago #

    I think you just need to change the_content to the_excerpt.

  3. Leon
    Posted 9 years ago #

    Hmm.. Yes I tried that, but it doesn't work, probably because I have only an image before the <!--more-->tag. And the exerpt doesn't work with html tags I think...

Topic Closed

This topic has been closed to new replies.

About this Topic