First of all, I apologise if this has been covered elsewhere. I have had a search through Support under everything I could think of, but I don't really know what I am looking for! I will gladly be redirected if someone knows of an identical thread. :)
I'm not very php savvy... I'm learning slowly and surely, but I'm having some trouble with displaying the
<--More--> tag when fetching the most recent post from my 'news' category (id=3) on my custom homepage template.
Here is the relevant php:
<?php $posts = get_posts( "category=3&numberposts=1" ); ?> <?php if( $posts ) : ?> <?php foreach( $posts as $post ) : setup_postdata( $post ); ?> <div class="post"> <a href="<?php echo get_permalink($post->ID); ?>" ><?php echo $post->post_title; ?></a> <?php the_content('Read the rest of this entry »'); ?> </div> <?php endforeach; ?> <?php endif; ?>
Have I commited some kind of horrible faux pas?
The most recent post from the category displays just fine, but appears to ignore the More tag. I've also tried replacing the_content with the_excerpt and using the Optional Excerpts section when authoring, and this actually does, although the "read more" link is not a link at all, and actually just says [...]
Any help would be very much appreciated.
Am running WP 2.1.2 and the only plugin I've installed is the iinclude plugin ("Improved Include Page").