Thord Daniel Hedengren - Smashing WordPress_ Beyond the Blog-Wiley (2014)

(avery) #1

CHAPTER 3 • The Loop 47


Figure 3-1: All these posts are outputted with the loop.


Incidentally, you can make the Read More link appear in any way you like — for example:


<?php the_content( 'Read more here, mate!' ); ?>


This would change the default Read More link text to “Read more here, mate!” There are more
options for this, and you can even put HTML code in it (or perhaps a graphic instead of text).
The important thing is that the template tag the_content() outputs the post content, and
if it is a blog listing, it breaks it with a Read More link if the tag is inserted.


Naturally, when you’re on a single-post page and the_content() is used (whether custom
Read More text is defined or not), it won’t output a Read More link. You’ll see the full post.

Free download pdf