476 CHAPTER 17 CUSTOMIZING YOUR BLOG S LAYOUT add a link with, by default, the text (more…), as shown in Figure 17-14. This link will take your reader to the single-page view of your article. This view will have the full text of your article followed by any comments and the comment form as normal. As a nice feature for the reader, the page will be scrolled to the text following the more link, ready for them to continue reading. Figure 17-14. The more link on the page You can change the text used for the link so it says something other than more by using the template tag the_content() in your template. This tag retrieves the content of your post and can take a parameter specifying the text to use in the link. Listing 17-10 shows an example of a different prompt. Listing 17-10. Alternative Teaser Prompt Passed to the_content() in main-content.php
Click to read this article…’); ?>
Notice that Listing 17-10 includes an XHTML break tag,
, in the text. You can add any HTML tag valid in a link. For instance, you could include an image as part of the link. The output from this example is shown in Figure 17-15. A final point about this teaser tag is a companion tag you can use: . This tag will stop WordPress from displaying the teaser part of your article on the page after the reader clicks; that is, the text before the (more…)