How to change “Read More” PHP code
-
The following code works in my index.php page:
<?php if(is_category() || is_archive()) {
the_excerpt();
} else {
the_content('Read the rest of this entry »');
} ?>
But, when I add the line to “Read More…” to the excerpt display, I get a parse error.
<?php if(is_category() || is_archive()) {
the_excerpt();
<a href="<?php the_permalink() ?>" title="full post">Read more...</a>
;
} else {
the_content('Read the rest of this entry »');
} ?>
I’ve tried all sorts of ways to do this and I can’t get it to work. Any ideas? (I’m not obviously good at this.)
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘How to change “Read More” PHP code’ is closed to new replies.