Clickable Excerpt
-
I interested in setting a code that will enable me to do the following.
1. Display full post if no excerpt is filled in.
2. Display excerpt when it is filled in and have link so that when one clicks on the excerpt it takes you to the full post.I have already searched the whole forum but could not find a solution. I did come across this
<?php
if(!$post->post_excerpt) {
the_content();
} else {
echo "<b>".$post->post_excerpt."</b>";
}
But it falls short as I noticed it not possible to insert a link to the full post.I ideally I will know how insert the code below into the one above, so that when the excerpt is displayed, I can click on it to see the full post (the whole excerpt has be to clickable, not just having a link to the full post).
<pre>
<a rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_excerpt(); ?></a>
?>
</pre>I hope I explained that well.
- The topic ‘Clickable Excerpt’ is closed to new replies.