Skip to Content
WordPress® All-in-One For Dummies®
book

WordPress® All-in-One For Dummies®

by Lisa Sabin-Wilson, Cory Miller, Kevin Palmer, Andrea Rennick, Michael Torbert
April 2011
Beginner to intermediate content levelBeginner to intermediate
908 pages
22h 37m
English
For Dummies
Content preview from WordPress® All-in-One For Dummies®

Customizing Your Blog Posts with Template Tags

This section covers the template tags that you use to display the body of each blog post you publish. The body of a blog post includes information such as the post date and time, title, author name, category, and content. Table 3-4 lists the common template tags you can use for posts, available for you to use in any WordPress theme template. The tags in Table 3-4 work only if you place them within The Loop (covered earlier in this chapter and found in the loop.php template file).

Table 3-4 Template Tags for Blog Posts

Tag Function
get_the_date(); Displays the date of the post.
get_the_time(); Displays the time of the post.
the_title(); Displays the title of the post.
the_permalink(); Displays the permalink (URL) of the post.
get_the_author(); Displays the post author' name.
the_author_link(); Displays the URL of the post author' site.
the_content(‘Read More...’); Displays the content of the post. (If you use an excerpt [below], the words Read More appear and are linked to the individual post page.)
the_excerpt(); Displays an excerpt (snippet) of the post.
the_category(); Displays the category (or categories) assigned to the post. If the post is assigned to multiple categories, commas will separate them.
comments_popup_link (‘No Comments’, ‘Comment (1)’, ‘Comments(%)’); Displays a link to the comments, along with the comment count for the post in parentheses. (If no comments exist, it displays a No Comments ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

WordPress® 24-Hour Trainer

WordPress® 24-Hour Trainer

George Plumley
Gaming Hacks

Gaming Hacks

Simon Carless

Publisher Resources

ISBN: 9780470877012Purchase book