Configure a
Kicker, a
Byline and a
Footer for posts and pages by arranging these
Post Info Items.
Some of these post info items have one or several
parameters:
- You can leave parameters empty but do not remove their single quotes, even if the parameter is empty.
- Replace the parameter
delimiter
with what you want to put between the list items of the tag or category list, i.e. a comma.
- Replace the parameters
before
and after
with what you want to display before or after that info item. If an item has these "before/after" parameters, use them instead of
hard coding text before and after that item: Example: Use
%tags-linked('Tags: ', ', ', ' - ')%
instead of
Tags: %tags-linked('', ', ', '')% -
- Replace the parameter
linktext
with the link text for that item.
HTML and
icons can be used, inside of parameters, too, just not inside the date item:
<image(someimage.gif)>
to include an image. Note: The image item doesn't have quotes
- To use your own images, upload them to /[theme-folder]/images/icons/
Icons
Currently available images (Once you uploaded yours they will be listed here):
$file) {
echo '
<image(' . "$file" . ')>
';
}
?>
Examples
Examples for
Post Bylines:
By %author%, on %date('F jS, Y')%
<strong>%author-linked%</strong> posted this in <strong>%categories-linked(', ')%</strong> on <em>%date('F jS, Y')%</em>
<image(user.gif)> %author-linked% <image(date.gif)> %date('l, jS #of F Y #a#t h:i:s A')%
Examples for
Post Footers:
%tags-linked('<strong>Tags:</strong> ', ', ', ' — ')% <strong>Categories:</strong> %categories-linked(', ')% — %comments('Nobody has commented yet, kick it off...', 'One comment so far', '% people had their say - be the next!', 'Sorry, but comments are closed')% —
%wp-print% — %wp-email% — %sociable% — %wp-postviews%
Post Info Items
List of available post info items:
%author%
Prints the name of the author of the post.
%author-linked%
Prints the name of the author of the post, and links it to a page listing all posts by that author.
%date('F jS, Y')%
Prints the date and/or time the post was published at. Many configuration options at
PHP Date.
Because most letters of the alphabet represent a certain date/time output function, you will have to
escape each letter that you want to display LITERALLY, for instance, to
include words like
at,
on, or
the somewhere
inside the date output. To
escape a letter put a hash sign
# right before that letter. (Please note that this is different from the original "PHP way" of escaping with backslashes
\
. The theme needs the hash sign
#
).
That will tell the theme that you mean the actual letter and not the corresponding PHP date function.
How to escape literal strings
- on ->
#o#n
- of ->
#of
(Note how the the lowercase f didn't get a #
. That's because f is one of the letters of the alphabet that does not represent a PHP date function)
- at ->
#a#t
- the ->
#t#h#e
- The arrows just illustrate how to change a word to display it literally inside a date function, don't use them
Examples:
%date('F j, Y, #a#t g:i a')%
displays: December 10, 2008, at 5:16 pm
Note how the letters a and t of the word at are escaped with #
to display them literally instead of interpreting them as PHP date functions.
%date('F j, Y, g:i a')%
displays: December 10, 2008, 5:16 pm
%date('m.d.y')%
displays: 10.12.08
%category%
Prints the name of the
first category the post is filed under.
%category-linked%
Prints the name of the
first category the post is filed under and links the name to that category page.
%categories('delimiter')%
Prints the names of
all categories the post is filed under, separated by delimiter.
Example: %categories(', ')%
%categories-linked('delimiter')%
Prints the names of
all categories the post is filed under, separated by delimiter, and links each name to the respective category page.
Example: %categories-linked(' | ')%
%tags('before', 'delimiter', 'after')%
Prints the names of all tags attached to the post, separated by delimiter.
Example: %tags('Tags: ', ', ', '')%
%tags-linked('before', 'delimiter', 'after')%
Prints the names of all tags attached to the post, separated by delimiter, and links each name to the respective tag page.
Example: %tags-linked('Tagged with: ', ' - ', '. ')%
%comments('No comments', '1 comment', '% comments', 'Comments closed')%
Prints a link to the comment section of the post. The link text depends on the comment count & status (open/closed).
When using this item, provide 4 text strings for the 4 possible comment states:
- Replace
'No Comments'
with your link text for posts that have no comments yet
- Replace
'1 comment'
with your text for posts with 1 comment
- Replace
'% comments'
with your text for posts with 2 or more comments. The %
(percent) character
will be replaced with the comment count. Use that character in your own text, too, unless you do not want to display the comment count.
- Replace
'Comments closed'
with your text for posts where comments are closed.
Example: %comments('Leave your comment', 'One comment so far', '% people had their say - chime in!', 'Sorry, but comments are closed')%
%comments-rss('linktext')%
Prints a link to the RSS feed of the post's comments, with
linktext as the link text.
Example: %comments-rss('Subscribe to the comments of this post')%
%trackback%
Prints the trackback URL of the post, without linking it.
%trackback-linked('linktext')%
Prints a link to the trackback URL of the post, with
linktext as the link text.
Example: %trackback-linked('Trackback this Post')%
%print('linktext')%
Prints a link with
linktext as the link text, which, when clicked, will start printing the content of the center column of the current page, without header, sidebars and footer.
Example: %print('Print this Page')%
%edit('before', 'linktext', 'after')%
Prints a direct edit link for the post, IF the current viewer is permitted to edit posts, with
linktext as the link text.
Example: %edit(' - ', 'Edit This Post', '')%
%wp-print%
Prints a link to a print preview page of the post. A configurable alternative to the theme's own basic print function (which prints right away, without preview page).
\'Print\'"
href="options-general.php?page=wp-print/print-options.php">WP-Print Options Page.' :
'To use this item, you must first install (= upload) and activate the plugin "
WP-Print"' ); ?>
%wp-email%
Prints a link to a form where visitors can e-mail the post to others.
WP-Email Options Page.
Settings: - Change settings in the section "E-Mail Styles" to customize the output of this item
- Make other changes as you see fit
- Click "Save Changes"
' :
'To use this item, you must first install (= upload) and activate the plugin "
WP-Email"' ); ?>
%wp-postviews%
Prints how many times the post was viewed.
\'Post Views\'"
href="options-general.php?page=wp-postviews/postviews-options.php">WP-PostViews Options Page.
Settings: - Change "Views Template" to customize the output of this item
- Make other changes as you see fit
- Click "Save Changes"
' :
'To use this item, you must first install (= upload) and activate the plugin "
WP-PostViews"' ); ?>
%wp-postratings%
Prints stars or other graphics showing the vote/rating of a post, and lets visitors rate the post.
WP-PostRatings Options Page.
Settings: - Delete
%RATINGS_TEXT%
from the bottom of the textarea named "Ratings Vote Text:"
- Delete
%RATINGS_TEXT%
from the bottom of the textarea named "Ratings None:"
- Make other changes as you see fit
- Click "Save Changes"
' :
'To use this item, you must first install (= upload) and activate the plugin "
WP-PostRatings"' ); ?>
%sociable%
Prints little icons, linking the post to social bookmark sites.
\'Sociable\'"
href="options-general.php?page=Sociable">Sociable Options Page.
Settings: - "Tagline:" - Will be ignored
- "Position:" - Uncheck all boxes
- "Use CSS:" - Uncheck this
- "Open in new window:" - Check or uncheck, will be used
- Click "Save Changes"
' :
'To use this item, you must first install (= upload) and activate the plugin "
Sociable"' ); ?>