On my blog on all my main loops I have it set to show the excerpt
instead of the content
If I make a longer post and leave the excerpt
text box empty, then wordpress will make it’s own excerpt from my post and show the [...]
or a custom link at the end. Thats great however if I DO enter my own excerpt into the excerpt textbox, it will show that text but it will not show the read more part added to it.
Does anyone know how I can make it always show a read more?
4 Answers
Perhaps a conditional statement like the following will work. The logic is: “If the post has an explicit excerpt, add a read more link. Otherwise, use default excerpt behavior.”
if($post->post_excerpt) {
the_excerpt();
echo '<a href="'.get_permalink().'">Read More</a>';
} else {
the_excerpt();
}
You can use this in combination with Gavin’s suggestion to unify the appearance of the “Read More” link.