Creating a “read more” link in excerpts
-
Currently when showing excerpts, the title links to the content, but even when I use the following :
<?php the_excerpt('Read the rest of this entry »'); ?>
There is no “Read the rest of this entry” at the end of the excerpt. I want both the title AND a link at the end of the excerpt to go to the full post, because many people don’t know they can click the title.
How do I add an automatic link at the end of the excerpt that will go to the permalink? The closest I’ve come is something like this but it’s not correct PHP and my PHP knowledge is at the very beginner level:
<?php if ( is_category() || is_archive() ) { the_excerpt() "<a href="<?php the_permalink() ?>"Read more »</a>"; } else { the_content(); } ?>
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Creating a “read more” link in excerpts’ is closed to new replies.