Reputation: 201
I have placed a read more element in my post and while the read more appears on my page when I click it, it does not display the rest of the post.
<?php
global $more;
$more = 0;
?>
<div id="content">
<?php
query_posts('cat=5');
while (have_posts()) : the_post();
$thumb_id = get_post_thumbnail_id();
$thumb_url = wp_get_attachment_image_src($thumb_id,'full', true);
echo '<div class="myContent">
<img class="image" src="'.$thumb_url[0].'" >';
the_content('<div class="read">READ MORE</div>');
echo'</div>';
endwhile;
?>
</div>
Upvotes: 0
Views: 48
Reputation: 246
Because there is no link pointing. it should be like this maybe:
<?php
global $more;
$more = 0;
?>
<div id="content">
<?php
query_posts('cat=5');
while (have_posts()) : the_post();
$thumb_id = get_post_thumbnail_id();
$thumb_url = wp_get_attachment_image_src($thumb_id,'full', true);
echo '<div class="myContent">
<img class="image" src="'.$thumb_url[0].'" >';
the_content('<div class="read"><a href="<?php the_permalink ?>">READ MORE</a></div>');
echo'</div>';
endwhile;
?>
</div>
Upvotes: 1