Author Template Tags
Author the_author();
<?php the_author(); ?>
|
The author of a post can be displayed by using this Template Tag. This tag must be used within The Loop.
Author Description the_author_description();
<?php the_author_description(); ?>
|
Displays the contents of the About yourself field in an author's Profile (Administration > Profile > Your Profile). About yourself is a block of text often used to publicly describe the user and can be quite long. This tag must be used within The Loop.
Author Login the_author_login();
<?php the_author_login(); ?>
|
This tag displays the login name for the author of a post. The login is also referred to as the Username an author uses to gain access to a WordPress blog. This tag must be used within The Loop.
Author First Name the_author_firstname();
<?php the_author_firstname(); ?>
|
This tag displays the first name for the author of a post. The First Name field is set in the user's profile (Administration > Profile > Your Profile). This tag must be used within The Loop.
Author Last Name the_author_lastname();
<?php the_author_lastname(); ?>
|
This tag displays the last name for the author of a post. The Last Name field is set in the user's profile (Administration > Profile > Your Profile). This tag must be used within The Loop.
Author Nickname the_author_nickname();
<?php the_author_nickname(); ?>
|
This tag displays the nickname for the author of a post. The Nickname field is set in the user's profile (Administration > Profile > Your Profile). This tag must be used within The Loop.
Author ID the_author_ID();
<?php the_author_ID(); ?>
|
Displays the unique numeric user ID for the author of a post; the ID is assigned by WordPress when a user account is created. This tag must be used within The Loop.
Author E-Mailthe_author_email();
<?php the_author_email(); ?>
|
This tag displays the email address for the author of a post. The E-mail field is set in the user's profile (Administration > Profile > Your Profile). This tag must be used within The Loop.
Author Website URLthe_author_url();
<?php the_author_url(); ?>
|
This tag displays the email address for the author of a post. The E-mail field is set in the user's profile (Administration > Profile > Your Profile). This tag must be used within The Loop.
Author Linkthe_author_link();
<?php the_author_link(); ?>
|
This tag displays a link to the Website for the author of a post. The Website field is set in the user's profile (Administration > Profile > Your Profile). The text for the link is the author's Profile Display name publicly as field. This tag must be used within The Loop.
Author AIM Screennamethe_author_aim();
<?php the_author_aim(); ?>
|
This tag displays the AOL Instant Messenger screenname for the author of a post. The AIM field is set in the user's profile (Administration > Profile > Your Profile). This tag must be used within The Loop.
Author Yahoo IM IDthe_author_yim();
<?php the_author_yim(); ?>
|
This tag displays the Yahoo IM ID for the author of a post. The Yahoo IM field is set in the user's profile (Administration > Profile > Your Profile). This tag must be used within The Loop.
Author Poststhe_author_posts();
<?php the_author_posts(); ?>
|
Displays the total number of posts an author has published. Drafts and private posts are not counted. This tag must be used within The Loop.
Author Posts Linkthe_author_posts_link();
<?php the_author_posts_link(); ?>
|
Displays a link to all posts by an author. The link text is the user's Display name publicly as field. The results of clicking on the presented link will be controlled by the Template Hierarchy of Author Templates. This tag must be used within The Loop
Author Listwp_list_authors();
<?php wp_list_authors('arguments'); ?>
Usage with Multiple Parameters
<?php wp_list_authors('exclude_admin=1&show_fullname=0'); ?>
optioncountDisplay number of published posts by each author. <?php wp_list_authors('optioncount=1'); ?> |
|
exclude_adminExclude the 'admin' (login is admin) account from authors list. <?php wp_list_authors('exclude_admin=0'); ?>> |
|
show_fullnameDisplay the full (first and last) name of the authors. If false, the nickname is displayed. <?php wp_list_authors('show_fullname=1'); ?>> |
|
hide_emptyDo not display authors with 0 posts.. <?php wp_list_authors('hide_empty=0'); ?> |
|
feedText to display for a link to each author's RSS feed. Default is no text, and no feed displayed. <?php wp_list_authors('feed=RSS'); ?> |
|
feed_imagePath/filename for a graphic. This acts as a link to each author's RSS feed, and overrides the feed parameter. <?php wp_list_authors('feed_image=images/picture.jpg'); ?>> |
|
Displays a list of the blog's authors (users), and if the user has authored any posts, the author name is displayed as a link to their posts. Optionally this tag displays each author's post count and RSS feed link.
Category Template Tags
Post Categorythe_category();
<?php the_category('arguments'); ?>
seperatorText or character to display between each category link. The default is to place the links in an unordered list. <?php the_category('seperator=•'); ?> |
|
parentsHow to display links that reside in child (sub) categories. <?php the_category('parents=multiple'); ?> |
|
Displays a link to the category or categories a post belongs to. This tag must be used within The Loop.
Post Category in RSS Formatthe_category_rss();
<?php the_category_rss('arguments'); ?>
typeThe type of feed to display to. <?php the_category_rss('type=rss'); ?> |
|
Displays the name of the category or categories a post belongs to in RSS format. This tag must be used within The Loop.
Page Category Titlesingle_cat_title();
<?php single_cat_title('prefix', 'display'); ?>
prefixText to output before the category title. Defaults to '' (no text). <?php single_cat_title('•','display'); ?> |
|
displayDisplay the category's title <?php single_cat_title('prefix','TRUE'); ?> |
|
Displays or returns the category title for the current page. For pages displaying WordPress tags rather than categories (e.g. "/tag/geek") the name of the tag is displayed instead of the category.
Category Descriptioncategory_description();
<?php category_description(category); ?>
categoryReturns the description of a category <?php category_description('2'); ?> |
|
Displays or returns the category title for the current page. For pages displaying WordPress tags rather than categories (e.g. "/tag/geek") the name of the tag is displayed instead of the category.
Category Dropdownwp_dropdown_categories('arguments');
<?php wp_dropdown_categories('arguments'); ?>
show_option_allCauses the HTML for the dropdown to allow you to select All of the categories. <?php wp_dropdown_categories('show_option_all='); ?> |
|
show_option_noneCauses the HTML for the dropdown to allow you to select NONE of the categories. <?php wp_dropdown_categories('show_option_none='); ?> |
|
orderbyKey to sort options by. <?php wp_dropdown_categories('orderby=name'); ?> |
|
orderSort order for options. <?php wp_dropdown_categories('order=DESC'); ?> |
|
show_last_updateSets whether to display the date of the last post in each category. <?php wp_dropdown_categories('show_last_update=1'); ?> |
|
show_countSets whether to display a count of posts in each category. <?php wp_dropdown_categories('show_count=1'); ?> |
|
hide_emptySets whether to hide (not display) categories with no posts. <?php wp_dropdown_categories('hide_empty=0'); ?> |
|
child_ofOnly display categories that are children of the category identified by its ID. There is no default for this parameter. <?php wp_dropdown_categories('child_of=5'); ?> |
|
excludeComma separated list of category IDs to exclude. For example, 'exclude=4,12' means category IDs 4 and 12 will NOT be displayed/echoed or returned. Defaults to exclude nothing. <?php wp_dropdown_categories('exclude=5'); ?> |
|
echoDisplay bookmarks (TRUE) or return them for use by PHP (FALSE). <?php wp_dropdown_categories('echo=0'); ?> |
|
selectedCategory ID of the category to be 'selected' or presented in the display box. Defaults to no category selected. <?php wp_dropdown_categories('selected=5'); ?> |
|
heirarchialDisplay categories in hierarchical fashion (child categories show indented). <?php wp_dropdown_categories('heirarchial=1'); ?> |
|
nameName assigned to the dropdown form. Defaults to 'cat'. <?php wp_dropdown_categories('name=cat-dropdown'); ?> |
|
classClass assinged to the dropdown form. Defaults to 'postform'. <?php wp_dropdown_categories('class=cat-dropdown'); ?> |
|
depthThis parameter controls how many levels in the hierarchy of Categories are to be included in the list of Categories. <?php wp_dropdown_categories('depth=n'); ?> |
|
Displays a list of categories in a select (i.e dropdown) box with no submit button.
Category Link Listwp_list_categories();
<?php wp_list_categories('arguments'); ?>
show_option_allA non-blank values causes the display of a link to all categories if the style is set to list. The default value is not to display a link to all. <?php wp_list_categories('show_option_all='); ?> |
|
orderbySort categories alphabetically, by unique Category ID, or by the count of posts in that Category. The default is sort by category name. <?php wp_list_categories('orderby=count'); ?> |
|
orderSort order for categories (either ascending or descending). <?php wp_list_categories('order=DESC'); ?> |
|
show_last_updatedShould the last updated timestamp for posts be displayed (TRUE) or not (FALSE). <?php wp_list_categories('show_last_updated=1'); ?> |
|
styleStyle to display the categories list in. A value of list displays the categories as list items while none generates no special display method (the list items are separated by tags). <?php wp_list_categories('style=none'); ?> |
|
show_countToggles the display of the current count of posts in each category. <?php wp_list_categories('show_count=1'); ?> |
|
hide_emptyToggles the display of categories with no posts. <?php wp_list_categories('hide_empty=0'); ?> |
|
use_desc_for_titleSets whether a category's description is inserted into the title attribute of the links created <?php wp_list_categories('use_desc_for_title=0'); ?> |
|
child_ofOnly display categories that are children of the category identified by this parameter. There is no default for this parameter. If the parameter is used, the hide_empty parameter is set to false. <?php wp_list_categories('child_of=5'); ?> |
|
feedDisplay a link to each category's rss-2 feed and set the link text to display. The default is no text and no feed displayed. <?php wp_list_categories('feed=RSS'); ?> |
|
feed_imageSet a URI for an image (usually an rss feed icon) to act as a link to each categories' rss-2 feed. This parameter overrides the feed parameter. There is no default for this parameter. <?php wp_list_categories('feed_images=images/picture.jpg'); ?> |
|
excludeExclude one or more categories from the results. This parameter takes a comma-separated list of categories by unique ID, in ascending order. <?php wp_list_categories('exclude=5'); ?> |
|
includeOnly include the categories detailed in a comma-separated list by unique ID, in ascending order. <?php wp_list_categories('include=5'); ?> |
|
heirarchialDisplay sub-categories as inner list items (below the parent list item) or inline. <?php wp_list_categories('heirarchial=0'); ?> |
|
title_liSet the title and style of the outer list item. Defaults to "_Categories". If present but empty, the outer list item will not be displayed. <?php wp_list_categories('titleli=_cats'); ?> |
|
numberSets the number of Categories to display. This causes the SQL LIMIT value to be defined. Default to no LIMIT. <?php wp_list_categories('number=7'); ?> |
|
echoShow the result or keep it in a variable. <?php wp_list_categories('echo=0'); ?> |
|
depthThis parameter controls how many levels in the hierarchy of Categories are to be included in the list of Categories. <?php wp_dropdown_categories('depth=n'); ?> |
|
The template tag, wp_list_categories, displays a list of Categories as links. When a Category link is clicked, all the posts in that Category will display on a Category Page using the appropriate Category Template dictated by the Template Hierarchy rules.
If In Categoryin_category();
<?php if ( in_category('category_id') ): ?>
// Some category specific PHP/HTML here
<?php endif; ?>
category_idThe category ID of the category for which you wish to test. The parameter may either be passed as a bare integer or as a string <?php if (in_category('6')): ?> |
|
Returns true if the current post is in the specified Category. Normally this tag is used within The Loop, but the $post variable must be set when using this tag outside of the loop.
Category's Parents Listget_category_parents();
<?php echo(get_category_parents(category, display link, separator, nice name)); ?>
categoryThe numeric category ID for which to return the parents. Defaults to current category, if one is set. <?php echo(get_category_parents(3, display link, separator, nice name)); ?> |
|
display linkCreates a link to each category displayed. <?php echo(get_category_parents(category, TRUE, separator, nice name)); ?> |
|
seperatorWhat to separate each category by. <?php echo(get_category_parents(category, display link, &;bull;, nice name)); ?> |
|
nice nameReturn category nice name or not <?php echo(get_category_parents(category, display link, seperator, TRUE)); ?> |
|
Returns a list of the parents of a category, including the category, sorted by ID.
Category Arrayget_the_category();
<?php foreach((get_the_category()) as $category) {
echo $category->cat_name . ' ';
}
?>
Member Variables | |
Variable | Description |
cat_ID | the category id (also stored as 'term_id') |
cat_name | the category name (also stored as 'name') |
category_nicename | a slug generated from the category name (also stored as 'slug') |
category_description | the category description (also stored as 'description') |
category_parent | the category id of the current category's parent. '0' for no parents. (also stored as 'parent') |
category_count | the number of uses of this category (also stored as 'count') |
Returns an array of objects, one object for each category assigned to the post. This tag must be used within The Loop.
Comment Template Tags
Comment Countcomments_number();
<?php comments_number('zero', 'one', 'more', 'number'); ?>
zeroText to be displayed if there is no comments <?php comments_number('No Comments', 'one', 'more', 'number'); ?> |
|
oneText to be displayed if there is 1 comment <?php comments_number('zero', '1 Comment', 'more', 'number'); ?> |
|
moreText to be displayed if there more than 1 comment. % is replaced by the number of comments, so '% so far' is displayed as "5 so far" when there are five comments. <?php comments_number('zero', 'one', '% Comments', 'number'); ?> |
|
numberNumber of comments. Defaults to the total actual number of comments <?php comments_number('zero', 'one', 'more', '5'); ?> |
|
Displays the total number of comments, Trackbacks, and Pingbacks for a post. This tag must be within The Loop.
Link to Post Commentscomments_link();
<?php comments_link(); ?>
|
Displays the URL to a post's comments. This tag must be within The Loop, or the loop set up for comments.
Link to RSS Feed of Post Commentscomments_rss_link();
<?php comments_rss_link('text', 'file'); ?>
textLink text for the comments RSS link. Defaults to 'Comments RSS' <?php comments_rss_link('RSS', 'file'); ?> |
|
fileThe file the link points to. Defaults to 'wp-commentsrss2.php'. <?php comments_rss_link('text', 'wp-commentsrss2.php'); ?> |
|
Much like an RSS feed for your WordPress blog, this feature will display a link to the RSS feed for a given post's comments. By implementing the feature, your readers will be able to track the comment thread for a given post, perhaps encouraging them to stay connected to the conversation.
JavaScript for Pop-Up Windowcomments_popup_script();
<?php comments_popup_script(width, height); ?>
widthThe width of the popup window. Defaults to 400 (pixels). <?php comments_popup_script(300, height); ?> |
|
heightThe height of the popup window. Defaults to 400 (pixels). <?php comments_popup_script(width, 300); ?> |
|
Outputs the JavaScript code for a comments popup window. Used in tandem with comments_popup_link(), this tag can be used anywhere within a template, though is typically placed within the <head> portion of a page.
Link to Pop-Up Windowcomments_popup_script();
<?php comments_popup_link ('zero','one','more','CSSclass','none'); ?>
zeroText to display if there is no comments. <?php comments_popup_link ('No Comments','one','more','CSSclass'); ?> |
|
oneText to display if there is one comment. <?php comments_popup_link ('zero','1 Comment','more','CSSclass'); ?> |
|
moreText to dislay if there is more than one comment. <?php comments_popup_link ('zero','one','% Comments','CSSclass'); ?> |
|
CSSclassCSS (stylesheet) class for the link. This has no default value. <?php comments_popup_link ('zero','one','more','popup-link'); ?> |
|
noneComments off. <?php comments_popup_link ('none'); ?> |
|
Displays a link to the comments popup window if comments_popup_script() is used, otherwise it displays a normal link to comments. This tag must be within The Loop, or a comment loop, and it does nothing if is_single() or is_page() is true (even when within The Loop).
Comment IDcomment_ID();
<?php comment_ID(); ?>
|
Displays the numeric ID of a comment. This tag must be within The Loop, or a comment loop.
Author of Commentcomment_author();
<?php comment_author(); ?>
|
Displays the comment author name; that is, the one supplied by the commenter. If no name is provided (and "User must fill out name and email" is not enabled under Discussion Options), WordPress will assign "Anonymous" as comment author. This tag must be within The Loop, or a comment loop.
IP Address of Comment Authorcomment_author_IP();
<?php comment_author_IP(); ?>
|
Displays the comment author's IP address. This tag must be within The Loop, or a comment loop.
Email of Comment Authorcomment_author_email();
<?php comment_author_email(); ?>
|
Displays the comment author's email address, not linked. An email address must be provided if "User must fill out name and email" is enabled under Discussion Options. This tag must be within The Loop, or a comment loop.
Website URL of Comment Authorcomment_author_url();
<?php comment_author_url(); ?>
|
Displays the comment author's URL (usually their web site), not linked. This tag must be within The Loop, or a comment loop.
Mailto Link to Comment Authorcomment_author_email_link();
<?php comment_author_email_link('linktext', 'before', 'after'); ?>
linktextLink text for the email link. Default is the comment author's email address. <?php comment_author_email_link('Email', 'before', 'after'); ?> |
|
beforeText to display before the link. There is no default. <?php comment_author_email_link('linktext', '»', 'after'); ?> |
|
afterText to display after the link. There is no default. <?php comment_author_email_link('linktext', 'before', '«'); ?> |
|
Displays the comment author's email address, as a mailto link. An email address must be provided if "User must fill out name and email" is enabled under Discussion Options. This tag must be within The Loop, or a comment loop.
Link to Website URL of Comment Authorcomment_author_link();
<?php comment_author_link(); ?>
|
Displays the comment author's name linked to his/her URL, if one was provided. This tag must be within The Loop, or a comment loop.
Type of Commentcomment_type();
<?php comment_type('comment', 'trackback', 'pingback'); ?>
commentText to describe a comment type comment. Defaults to 'Comment' <?php comment_type('Comment!', 'trackback', 'pingback'); ?> |
|
trackbackText to describe a Trackback type comment. Defaults to 'Trackback'. <?php comment_type('comment', 'Trackback!', 'pingback'); ?> |
|
pingbackText to describe a Pingback type comment. Defaults to 'Pingback'. <?php comment_type('comment', 'trackback', 'Pingback!'); ?> |
|
Displays the type of comment (regular comment, Trackback or Pingback) a comment entry is. This tag must be within The Loop, or a comment loop.
Comment Textcomment_text();
<?php comment_text(); ?>
|
Displays the text of a comment. This tag must be within The Loop, or a comment loop.
Comment Excerptcomment_excerpt();
<?php comment_excerpt(); ?>
|
Displays an excerpt (maximum of 20 words) of a comment's text. This tag will work within a comment loop.
Date of Commentcomment_date();
<?php comment_date(); ?>
dFormatting for the date. Defaults to the date format set in WordPress. <?php comment_date('n-j-Y'); ?> |
|
Displays the date a comment was posted. This tag must be within The Loop, or a comment loop.
Time of Commentcomment_time();
<?php comment_time(); ?>
dFormatting for the time. Defaults to the time format set in WordPress. <?php comment_time('H:i:s'); ?> |
|
Displays the time a comment was posted. This tag must be within The Loop, or a comment loop.
Comment Author's Name Formatted for RSScomment_author_rss();
<?php comment_author_rss(); ?>
|
Displays the comment author's name formatted for RSS. Typically used in the RSS comment feed template. This tag must be within The Loop, or a comment loop.
Comment Text Formatted for RSScomment_text_rss();
<?php comment_text_rss(); ?>
|
Displays the text of a comment formatted for RSS. Typically used in the RSS comment feed template. This tag must be within The Loop, or a comment loop.
Comment Link Formatted for RSScomment_link_rss();
<?php comment_link_rss(); ?>
|
Displays the URL to an entry's comments formatted for RSS. Typically used in the RSS comment feed template. This tag must be within The Loop, or a comment loop.
Comment Permalink Formatted for RSSpermalink_comments_rss();
<?php permalink_comments_rss(); ?>
|
Displays the permalink to the post to which a comment belongs, formatted for RSS. Typically used in the RSS comment feed template. This tag must be within The Loop, or a comment loop.
Date & Time Template Tags
Post Date (xml)the_date_xml();
<?php the_date_xml(); ?>
|
Displays the date of the post in YYYY-MM-DD format (ex: 2004-09-24). This tag must be used within The Loop.
Post Datethe_date();
<?php the_date('format', 'before', 'after', echo); ?>>
formatThe format for the date. Defaults to the date format configured in your WordPress options. <?php the_date('n-j-Y', 'before', 'after', echo); ?> |
|
beforeText to place before the date. There is no default. <?php the_date('format', '»', 'after', echo); ?> |
|
afterText to place after the date. There is no default. <?php the_date('format', 'before', '«', echo); ?> |
|
echoDisplay the date (TRUE), or return the date to be used in PHP (FALSE). <?php the_date('format', 'before', 'after', TRUE); ?> |
|
Displays or returns the date of a post, or a set of posts if published on the same day. This tag must be used within the Loop.
Post Timethe_time();
<?php the_time('d'); ?>
dFormatting for the time. Defaults to the time format set in WordPress. <?php the_time('H:i:s'); ?> |
|
Displays the time of the current post. This tag must be used within The Loop.
Date (and Time) of Last Modification to Postthe_modified_date();
<?php the_modified_date('d'); ?>
dFormatting for the date to display in. Defaults to the date format set in WordPress. <?php the_modified_date('n-j-Y'); ?> |
|
This tag displays the date (and time) a post was last modified. This tag works just like the_modified_time(), which also displays the time/date a post was last modified. This tag must be used within The Loop. If no format parameter is specified, the Default date format (please note that says Date format) setting from Administration > Options > General is used for the display format.
Time (and Date) of Last Modification to Postthe_modified_time();
<?php the_modified_time('d'); ?>
dFormatting for the time to display in. Defaults to the date format set in WordPress. <?php the_modified_time('H:i:s'); ?> |
|
This tag displays the time (and date) a post was last modified and is similar to the functionality of the_time(), which displays the time (and date) a post was created. This tag must be used within The Loop. If no format parameter is specified, the Default date format (please note that says Date format) setting from Administration > Options > General is used for the display format.
Post Time (PHP)get_the_time();
<?php get_the_time('format'); ?>
formatThe format the time is to display in. Defaults to the time format configured in your WordPress options. <?php get_the_time(); ?> |
|
Returns the time of the current post for use in PHP. It does not display the time. This tag must be used within The Loop.
Current Page Month & Year Titlesingle_month_title();
<?php single_month_title('prefix', display) ?>
prefixText to place before the title. There is no default. <?php single_month_title('&bull', display) ?> |
|
displayDisplay the title (TRUE), or return the title to be used in PHP (FALSE). <?php single_month_title('prefix', FALSE) ?> |
|
Displays or returns the month and year title for the current page. This tag only works when the m or archive month argument has been passed by WordPress to the current page (this occurs when viewing a monthly archive page). Note: This tag only works on date archive pages, not on category templates or others.
Post Calendarget_calendar();
<?php get_calendar(); ?>
initialIf true, the day will be displayed using a one-letter initial; if false, an abbreviation based on your localization will be used. <?php get_calendar(false); ?> |
|
Returns the time of the current post for use in PHP. It does not display the time. This tag must be used within The Loop.
General Template Tags
Blog Infobloginfo();
<?php bloginfo('arguments'); ?>
nameWeblog title; set in General Options. (Default) <?php bloginfo('name'); ?> |
|
descriptionTagline for your blog; set in General Options. <?php bloginfo('description'); ?> |
|
urlURL for your blog's web site address. <?php bloginfo('url'); ?> |
|
rdf_urlURL for RDF/RSS 1.0 feed. <?php bloginfo('rdf_url'); ?> |
|
rss_urlURL for RSS 0.92 feed. <?php bloginfo('rss_url'); ?> |
|
rss2_urlURL for RSS 2.0 feed. <?php bloginfo('rss2_url'); ?> |
|
atom_urlURL for Atom feed. <?php bloginfo('atom_url'); ?> |
|
comments_rss2_urlURL for comments RSS 2.0 feed. <?php bloginfo('comments_rss2_url'); ?> |
|
pingback_urlURL for Pingback (XML-RPC file). <?php bloginfo('pingback_url'); ?> |
|
admin_emailAdministrator's email address; set in General Options. <?php bloginfo('admin_email'); ?> |
|
charsetCharacter encoding for your blog; set in Reading Options. <?php bloginfo('charset'); ?> |
|
versionVersion of WordPress your blog uses. <?php bloginfo('version'); ?> |
|
html_type"Content-type" for your blog. <?php bloginfo('html_type'); ?> |
|
wpurlURL for WordPress installation. <?php bloginfo('wpurl'); ?> |
|
template_urlURL for template in use. <?php bloginfo('template_url'); ?> |
|
template_directoryURL for template's directory. <?php bloginfo('template_directory'); ?> |
|
stylesheet_urlURL for primary CSS file. Returns: http//example.com/wp-content/themes/ + your-active-theme-name(value from wp_options, "stylesheet" row) + "/style.css"(hardcoded in functions.php) <?php bloginfo('stylesheet_url'); ?> |
|
Displays information about your blog, mostly gathered from the information you supply in your User Profile and General Options from the WordPress Administration panels. It can be used anywhere within a page template. This always prints a result to the browser. If you need the values for use in PHP, use get_bloginfo().
Blog Info RSSbloginfo_rss();
<?php bloginfo_rss('arguments'); ?>
nameWeblog title; set in General Options. (Default) <?php bloginfo('name'); ?> |
|
descriptionTagline for your blog; set in General Options. <?php bloginfo('description'); ?> |
|
urlURL for your blog's web site address. <?php bloginfo('url'); ?> |
|
rdf_urlURL for RDF/RSS 1.0 feed. <?php bloginfo('rdf_url'); ?> |
|
rss_urlURL for RSS 0.92 feed. <?php bloginfo('rss_url'); ?> |
|
rss2_urlURL for RSS 2.0 feed. <?php bloginfo('rss2_url'); ?> |
|
atom_urlURL for Atom feed. <?php bloginfo('atom_url'); ?> |
|
comments_rss2_urlURL for comments RSS 2.0 feed. <?php bloginfo('comments_rss2_url'); ?> |
|
pingback_urlURL for Pingback (XML-RPC file). <?php bloginfo('pingback_url'); ?> |
|
admin_emailAdministrator's email address; set in General Options. <?php bloginfo('admin_email'); ?> |
|
charsetCharacter encoding for your blog; set in Reading Options. <?php bloginfo('charset'); ?> |
|
versionVersion of WordPress your blog uses. <?php bloginfo('version'); ?> |
|
html_type"Content-type" for your blog. <?php bloginfo('html_type'); ?> |
|
wpurlURL for WordPress installation. <?php bloginfo('wpurl'); ?> |
|
template_urlURL for template in use. <?php bloginfo('template_url'); ?> |
|
template_directoryURL for template's directory. <?php bloginfo('template_directory'); ?> |
|
stylesheet_urlURL for primary CSS file. Returns: http//example.com/wp-content/themes/ + your-active-theme-name(value from wp_options, "stylesheet" row) + "/style.css"(hardcoded in functions.php) <?php bloginfo('stylesheet_url'); ?> |
|
Displays information about your blog, mostly gathered from the information you supply in your User Profile and General Options from the WordPress Administration panels. This function is identical to bloginfo() except it strips any markup from the output for use in WordPress' syndication feeds.
Blog Info (PHP)get_bloginfo();
<?php get_bloginfo('arguments'); ?>
nameDefault, returns the Weblog title set in Administration > Options > General. This data is retrieved from the blogname record in the wp_options table. <?php get_bloginfo('name'); ?> |
|
descriptionthe Tagline set in Administration > Options > General. This data is retrieved from the blogdescription record in the wp_options table. <?php get_bloginfo('description'); ?> |
|
urlDisplays the Blog address (URI) is the URL for your blog's web site address and is set in Administration > Options > General. This data is retrieved from the home record in the wp_options table. <?php get_bloginfo('url'); ?> |
|
homeDisplays the Blog address (URI) is the URL for your blog's web site address and is set in Administration > Options > General. This data is retrieved from the home record in the wp_options table. <?php get_bloginfo('home'); ?> |
|
siteurlDisplays the Blog address (URI) is the URL for your blog's web site address and is set in Administration > Options > General. This data is retrieved from the home record in the wp_options table. <?php get_bloginfo('siteurl'); ?> |
|
wpurlthe WordPress address (URI) is the URL for your WordPress installation and is set in Administration > Settings > General. This data is retrieved from the siteurl record in the wp_options table. <?php get_bloginfo('wpurl'); ?> |
|
rdf_urlURL for RDF/RSS 1.0 feed which is your Blog address (URI) appended with the string such as /feed/rfd. <?php get_bloginfo('rdf_url'); ?> |
|
rss_urlURL for RSS 0.92 feed which is your Blog address (URI) appended with the string such as /feed/rss. <?php get_bloginfo('rss_url'); ?> |
|
rss2_urlURL for RSS 2.0 feed which is your Blog address (URI) appended with the string such as /feed/rss. <?php get_bloginfo('rss2_url'); ?> |
|
atom_urlURL for Atom feed which is your Blog address (URI) appended with the string such as /feed/rss. <?php get_bloginfo('atom_url'); ?> |
|
comments_rss2_urlURL for comments RSS 2.0 feed which is your Blog address (URI) appended with the string such as /comments/feed. <?php get_bloginfo('comments_rss2_url'); ?> |
|
pingback_urlURL for Pingback (XML-RPC file) which is your Blog address (URI) appended with the string /xmlrpc.php. <?php get_bloginfo('pingback_url'); ?> |
|
stylesheet_urlURL for primary CSS file which is your Blog address (URI) appended with the string composed of /wp-content/themes plus the value of the stylesheet record in the wp_options table plus the string /style.css. <?php get_bloginfo('stylesheet_url'); ?> |
|
stylesheet_directoryURL for stylesheet directory which is your Blog address (URI) appended with the string composed of /wp-content/themes plus the value of the stylesheet record in the wp_options table. <?php get_bloginfo('stylesheet_directory'); ?> |
|
template_directoryURL for template's directory which is your Blog address (URI) appended with the string composed of /wp-content/themes plus the value of the template record in the wp_options table. <?php get_bloginfo('template_directory'); ?> |
|
template_urlURL for template's directory which is your Blog address (URI) appended with the string composed of /wp-content/themes plus the value of the template record in the wp_options table. <?php get_bloginfo('template_url'); ?> |
|
admin_emailthe Administrator's E-mail address set in Administration > Settings > General. This data is retrieved from the admin_email record in the wp_options table. <?php get_bloginfo('admin_email'); ?> |
|
charsetthe Encoding for pages and feeds set in Administration > Settings > Reading. This data is retrieved from the blog_charset record in the wp_options table. <?php get_bloginfo('charset'); ?> |
|
versionVersion of WordPress your blog uses. This data is the value of $wp_version variable set in wp-includes/version.php. <?php get_bloginfo('version'); ?> |
|
html_type"Content-type" for your blog. This value is set in wp-admin/upgrade-schema.php and is retrieved from the html_type record in the wp_options table . <?php get_bloginfo('html_type'); ?> |
|
The get_bloginfo() Template Tag returns information about your blog which can then be used elsewhere in your PHP code. This Template Tag, as well as bloginfo(), can also be used to display your blog information.
Blog Info RSS (PHP)get_bloginfo_rss();
<?php get_bloginfo_rss('arguments'); ?>
nameWeblog title; set in General Options. (Default) <?php get_bloginfo_rss('name'); ?> |
|
descriptionTagline for your blog; set in General Options. <?php get_bloginfo_rss('description'); ?> |
|
urlURL for your blog's web site address. <?php get_bloginfo_rss('url'); ?> |
|
rdf_urlURL for RDF/RSS 1.0 feed. <?php get_bloginfo_rss('rdf_url'); ?> |
|
rss_urlURL for RSS .92 feed. <?php get_bloginfo_rss('rss_url'); ?> |
|
rss2_urlURL for RSS 2.0 feed. <?php get_bloginfo_rss('rss2_url'); ?> |
|
atom_urlURL for Atom feed. <?php get_bloginfo_rss('atom_url'); ?> |
|
comments_rss2_urlURL for comments RSS 2.0 feed. <?php get_bloginfo_rss('comments_rss2_url'); ?> |
|
pingback_urlURL for Pingback (XML-RPC file). <?php get_bloginfo_rss('pingback_url'); ?> |
|
admin_emailAdministrator's email address; set in General Options. <?php get_bloginfo_rss('admin_email'); ?> |
|
charsetCharacter encoding for your blog; set in Reading Options. <?php get_bloginfo_rss('charset'); ?> |
|
versionVersion of WordPress your blog uses. <?php get_bloginfo_rss('version'); ?> |
|
html_type"Content-type" for your blog. <?php get_bloginfo_rss('html_type'); ?> |
|
wpurl"Content-type" for your blog. <?php get_bloginfo_rss('html_type'); ?> |
|
wpurl"Content-type" for your blog. <?php get_bloginfo_rss('html_type'); ?> |
|
template_urlURL for template in use. <?php get_bloginfo_rss('template_url'); ?> |
|
template_directoryURL for template's directory. <?php get_bloginfo_rss('template_directory'); ?> |
|
stylesheet_urlURL for primary CSS file. <?php get_bloginfo_rss('stylesheet_url'); ?> |
|
stylesheet_directoryURL for stylesheet directory. <?php get_bloginfo_rss('stylesheet_directory'); ?> |
|
Returns information about your blog, which can then be used elsewhere in your PHP code. This function is identical to get_bloginfo() except it strips any markup from the output for use in WordPress' syndication feeds.
Page Titlewp_title();
<?php wp_title('sep', echo, 'seplocation'); ?>
sepText to display before or after of the post title (i.e. the separator). By default (if sep is blank) then the » (») symbol will be placed before or after (specified by the seplocation) the post title. <?php wp_title('•', echo, 'seplocation'); ?> |
|
echoEcho the title (True) or return the title for use as a PHP string (False). <?php wp_title('sep', 1, 'seplocation'); ?> |
|
seplocationIntroduced with Version 2.5, this parameter defines the location of where the sep string prints in relation to the title of the post. <?php wp_title('sep', echo, 'right'); ?> |
|
Displays or returns the title of the page.
Get Postsget_posts;
<?php get_posts('arguments'); ?>
numberpostsNumber of posts to return. <?php get_posts('numberposts=10'); ?> |
|
offsetOffset from latest post. <?php get_posts('offset=1'); ?> |
|
categoryOnly show posts from this category ID. <?php get_posts('category=2'); ?> |
|
orderbySort posts by one of various values <?php get_posts('orderby=post_name'); ?> |
|
orderHow to sort 'orderby'. <?php get_posts('order=DESC'); ?> |
|
includeThe IDs of the posts you want to show, separated by commas and/or spaces. <?php get_posts('include=62'); ?> |
|
excludeThe IDs of any posts you want to exclude, separated by commas and/or spaces <?php get_posts('exclude=62'); ?> |
|
meta_key and meta_valueOnly show posts that contain a meta (custom) field with this key and value. Both parameters must be defined, or neither will work. <?php get_posts('meta_key=sport&meta_value=basketball'); ?> |
|
post_typeThe type of post to show. <?php get_posts('post_type=page'); ?> |
|
post_statusShow posts with a particular status. <?php get_posts('post_status=draft'); ?> |
|
post_parentShow only the children of the post with this ID <?php get_posts('post_parent=7'); ?> |
|
This is a simple tag for creating multiple loops.
Archives Listwp_get_archives();
<?php wp_get_archives('arguments'); ?>
typeThe type of archive list to display. Defaults to WordPress settings. <?php wp_get_archives('type=yearly'); ?> |
|
limitNumber of archives to get. Default is no limit. <?php wp_get_archives('limit=5'); ?> |
|
formatFormat for the archive list. <?php wp_get_archives('format=link'); ?> |
|
beforeText to place before the link when using the html or custom for format option. There is no default. <?php wp_get_archives('before=»'); ?> |
|
afterText to place after the link when using tge html or custom for format option. There is no default. <?php wp_get_archives('after=«'); ?> |
|
show_post_countDisplay number of posts in an archive. <?php wp_get_archives('show_post_count=1'); ?> |
|
This function displays a date-based archives list.
Page Link Listwp_list_pages();
<?php wp_list_pages('arguments'); ?>
sort_columnSorts the list of Pages in a number of different ways. <?php wp_list_pages('sort_column=ID'); ?> |
|
sort_orderChange the sort order of the list of Pages (either ascending or descending). <?php wp_list_pages('sort_order=desc'); ?> |
|
excludeDefine a comma-separated list of Page IDs to be excluded from the list <?php wp_list_pages('exclude=62'); ?> |
|
includeOnly include certain Pages in the list generated by wp_list_pages. Like exclude, this parameter takes a comma-separated list of Page IDs. <?php wp_list_pages('include=62'); ?> |
|
depthThis parameter controls how many levels in the hierarchy of pages are to be included in the list generated by wp_list_pages. <?php wp_list_pages('depth=1'); ?> |
|
child_ofDisplays the sub-pages of a single Page only; uses the ID for a Page as the value. <?php wp_list_pages('child_of=7'); ?> |
|
show_dateDisplay creation or last modified date next to each Page. The default value is the null value (do not display dates). <?php wp_list_pages('showdate=modified'); ?> |
|
date_formatControls the format of the Page date set by the show_date parameter (example: "l, F j, Y"). This parameter defaults to the date format configured in your WordPress options. <?php wp_list_pages('date_format=l, F j, Y'); ?> |
|
title_liSet the text and style of the Page list's heading. <?php wp_list_pages('title_li=Page List'); ?> |
|
echoToggles the display of the generated list of links or return the list as an HTML text string to be used in PHP. <?php wp_list_pages('echo=0'); ?> |
|
hierarchialDisplay sub-Pages in an indented manner below their parent or list the Pages inline. The default is true (display sub-Pages indented below the parent list item). <?php wp_list_pages('echo=0'); ?> |
|
meta_key and meta_valueOnly include the Pages that have this Custom Field Key and Value <?php wp_list_pages('meta_key=sport&meta_value=basketball'); ?> |
|
The Template Tag, wp_list_pages(), displays a list of WordPress Pages as links.
Page Dropdownwp_dropdown_pages();
<?php wp_dropdown_pages('arguments'); ?>
depthThis parameter controls how many levels in the hierarchy of pages are to be included in the list generated by wp_list_pages. <?php wp_dropdown_pages('depth=1'); ?> |
|
child_ofDisplays the sub-pages of a single Page only; uses the ID for a Page as the value. <?php wp_dropdown_pages('child_of=4'); ?> |
|
selectedPage ID of the page to be 'selected' or presented in the display box. Defaults to no page selected. <?php wp_dropdown_pages('selected=7'); ?> |
|
echoToggles the display of the generated list of links or return the list as an HTML text string to be used in PHP. The default value is 1 (display the generated list items). <?php wp_dropdown_pages('echo=0'); ?> |
|
nameName assigned to the dropdown form. Defaults to 'page_id'. <?php wp_dropdown_pages('name=page-id'); ?> |
|
show_option_noneCauses the HTML for the dropdown to allow you to select NONE of the pages. <?php wp_dropdown_pages('show_option_none='); ?> |
|
excludeComma separated list of category IDs to exclude. <?php wp_dropdown_pages('exclude=7,3'); ?> |
|
Displays a list of pages in a select (i.e dropdown) box with no submit button.
Login/Logout Linkwp_loginout();
<?php wp_loginout(); ?>
|
Displays a login link, or if a user is logged in, a logout link.
Register/Site Admin Linkwp_register();
<?php wp_register('before', 'after'); ?>
beforeText to display before the Register or Site Admin link. Default is '<li>'. <?php wp_register('»', 'after'); ?> |
|
afterText to display after the Register or Site Admin link. Default is '</li>'. <?php wp_register('before', '«'); ?> |
|
This tag displays either the "Register" link to users that are not logged in or the "Site Admin" link if a user is logged in.
Query Postsquery_posts();
<?php query_posts('parameters'); ?>
catDisplay the posts from one or more category ID's. <?php query_posts('cat=7'); ?> |
|
category_nameDisplay posts with a certain category name. <?php query_posts('category_name=Sports'); ?> |
|
tagShow posts associated with certain tags. <?php query_posts('tag=basketball'); ?> |
|
author_nameShow posts by an author with a certain name. <?php query_posts('author_name=Chase'); ?> |
|
authorShow posts by an author with a certain ID. <?php query_posts('author=3'); ?> |
|
pUse the post ID to show the first post. <?php query_posts('p=9'); ?> |
|
nameUse the post slug to show the first post. <?php query_posts('name=chase-crawford'); ?> |
|
page_idShow posts from a page with a certain ID. <?php query_posts('page_id=11'); ?> |
|
pagenameShow posts from this page with a certain name. <?php query_posts('pagename=about'); ?> |
|
showpostsShow a limited amount of posts. <?php query_posts('showposts=11'); ?> |
|
hourShow post belonging to this hour. <?php query_posts('hour=12'); ?> |
|
minuteShow posts belonging to this minute. <?php query_posts('minutes=33'); ?> |
|
secondShow posts belonging to this second. <?php query_posts('second=59'); ?> |
|
dayShow posts belonging to this day. <?php query_posts('day=14'); ?> |
|
monthnumShow posts belonging to this month. <?php query_posts('monthnum=6'); ?> |
|
yearShow posts belonging to this year. <?php query_posts('year=2003'); ?> |
|
pagedshow the posts that would normally show up just on page 2 when using the "Older Entries" link. <?php query_posts('paged=3'); ?> |
|
posts_per_pagenumber of posts to show per page; a value of -1 will show all posts. <?php query_posts('post_per_page=5'); ?> |
|
orderWhat order to display posts in. <?php query_posts('order=ASC'); ?> |
|
offsetDisplaces or passes over one or more initial posts which would normally be collected by your query. <?php query_posts('offset=1'); ?> |
|
orderbySort retrieved posts by this field. <?php query_posts('orderby=title'); ?> |
|
Query_posts can be used to control which posts show up in The Loop. It accepts a variety of parameters in the same format as used in your URL.
RSS Enclosuresrss_enclosure();
<?php rss_enclosure(); ?>
|
Transforms links to audio or video files in a post into RSS enclosures. Used for Podcasting.
Tag Cloudwp_tag_cloud();
<?php wp_tag_cloud(''); ?>
|
Displays a list of tags in what is called a 'tag cloud', where the size of each tag is determined by how many times that particular tag has been assigned to posts.
Search Querythe_search_query();
<?php the_search_query(''); ?>
|
Displays the search query for the current request, if a search was made.
Link Template Tags
'Edit Post' Linkedit_post_link();
<?php edit_post_link('link', 'before', 'after'); ?>
linkThe link text. Defaults to 'Edit This'. <?php edit_post_link('Edit', 'before', 'after'); ?> |
|
beforeText to put before the link text. There is no default. <?php edit_post_link('link', '»', 'after'); ?> |
|
afterText to put after the link text. There is no default. <?php edit_post_link('link', 'before', '«'); ?> |
|
Displays a link to edit the current post, if a user is logged in and allowed to edit the post.
'Edit Comment' Linkedit_comment_link();
<?php edit_comment_link('link', 'before', 'after'); ?>
linkThe link text. Defaults to 'Edit This'. <?php edit_post_link('Edit', 'before', 'after'); ?> |
|
beforeText to put before the link text. There is no default. <?php edit_post_link('link', '»', 'after'); ?> |
|
afterText to put after the link text. There is no default. <?php edit_post_link('link', 'before', '«'); ?> |
|
Displays a link to edit the current comment, if the user is logged in and allowed to edit the comment.
Page Linkswp_page_links();
<?php wp_page_links('arguments'); ?>
beforeText to put before all the links. Defaults to <p>Pages: <?php wp_page_links('before=<div>'); ?> |
|
afterText to put after all the links. Defaults to </p>. <?php wp_page_links('after=</div>'); ?> |
|
next_or_numberIndicates whether page numbers should be used. <?php wp_page_links('next_or_number=next'); ?> |
|
|
|
nextpagelinkText for link to next page. Defaults to Next page. <?php wp_page_links('nextpagelink=Next'); ?> |
|
previouspagelinkText for link to previous page. Defaults to Previous page. <?php wp_page_links('previouspagelink=Previous'); ?> |
|
pagelinkFormat string for page numbers. % in the string will be replaced with the number, so Page % would generate "Page 1", "Page 2", etc. Defaults to %. <?php wp_page_links('pagelink=[%]'); ?> |
|
more_filePage the links should point to. Defaults to the current page. <?php wp_page_links('more_file=more.php'); ?> |
|
Displays page-links for paginated posts.
Yearly Archive URLget_year_link();
<?php get_year_link('year'); ?>
yearThe year for the archive. Use '' to assign current year. <?php get_year_link('2003'); ?> |
|
Returns the yearly archive URL to a specific year for use in PHP. It does NOT display the URL. If year is set to '', the tag returns the URL for the current year's archive.
Monthly Archive URLget_month_link();
<?php get_month_link('year','month'); ?>
yearThe year for the archive. Use '' to assign current year. <?php get_month_link('2003','month'); ?> |
|
monthThe month for the archive. Use '' to assign current month. <?php get_month_link('year','10'); ?> |
|
Returns the monthly archive URL to a specific year and month for use in PHP. It does NOT display the URL. If year and month parameters are set to '', the tag returns the URL for the current month's archive.
Daily Archive URLget_day_link();
<?php get_day_link('year','month','day'); ?>
yearThe year for the archive. Use '' to assign current year. <?php get_day_link('2003','month','day'); ?> |
|
monthThe month for the archive. Use '' to assign current month. <?php get_day_link('year','10','day'); ?> |
|
dayThe day for the archive. Use '' to assign current day. <?php get_day_link('year','month','23'); ?> |
|
Returns the monthly archive URL to a specific year and month for use in PHP. It does NOT display the URL. If year and month parameters are set to '', the tag returns the URL for the current month's archive.
Previous Post Linksnext_posts_link();
<?php next_posts_link('Label', 'Max number of pages (default 0)'); ?>
|
This creates a link to the previous posts. Yes, it says "next posts," but it's named that just to confuse you.
Permalink Template Tags
Permalink Anchorpermalink_anchor();
<?php permalink_anchor('type'); ?>
typeType of anchor to output. <?php permalink_anchor('type=title'); ?> |
|
Outputs a permalink anchor identifier or id (<a id="....) for a post.
Permalink (PHP)get_permalink();
<?php get_permalink(id); ?>
idThe numeric ID for a post. When this tag is used in The Loop without an id parameter value, tag defaults to the current post ID. <?php get_permalink(17); ?> |
|
Returns the permalink to a post for use in PHP. It does NOT display the permalink and can be used outside of The Loop.
Permalink URLthe_permalink();
<?php the_permalink(); ?>
|
Displays the URL for the permalink to the post currently being processed in The Loop. This tag must be within The Loop, and is generally used to display the permalink for each post, when the posts are being displayed.
Permalink (formatted for syndication feeds)permalink_single_rss();
<?php permalink_single_rss('file'); ?>
fileThe page the link should point to. Defaults to the current page. <?php permalink_single_rss('index.php'); ?> |
|
Displays the URL for the permalink to the post currently being processed in The Loop. This tag must be within The Loop, and is generally used to display the permalink for each post, when the posts are being displayed.
Post Template Tags
Post IDthe_ID();
<?php the_ID(); ?>
|
Displays the numeric ID of the current post.
Post Titlethe_title();
<?php the_title(); ?>
beforeText to place before the title. Defaults to ''. <?php the_title("before=»"); ?> |
|
afterText to place after the title. Defaults to ''. <?php the_title("after=«"); ?> |
|
displayDisplay the title (TRUE) or return it for use in PHP (FALSE). <?php the_title("display=FALSE"); ?> |
|
Displays or returns the title of the current post.
Post Title (Attribute)the_title_attribute();
<?php the_title_attribute('arguments'); ?>
beforeText to place before the title. Defaults to ''. <?php the_title("before=»"); ?> |
|
afterText to place after the title. Defaults to ''. <?php the_title("after=«"); ?> |
|
echoDisplay the title (1) or return it for use in PHP (0). <?php the_title("echo=0"); ?> |
|
Displays or returns the title of the current post. It somewhat duplicates the functionality of the_title(), but provides a 'clean' version of the title by stripping HTML tags and converting certain characters (including quotes) to their character entity equivalent.
Single Post Titlesingle_post_title();
<?php single_post_title('prefix', display); ?>
prefixText to place before the title. Defaults to ''. <?php single_post_title('•', display); ? |
|
displayShould the title be displayed (TRUE) or returned for use in PHP (FALSE). <?php single_post_title('prefix', TRUE); ? |
|
Displays or returns the title of the post when on a single post page (permalink page).
Post Title (RSS)the_title_rss();
<?php the_title_rss(); ?>
|
Displays the title of the current post, formatted for RSS. This tag must be within The Loop.
Post Contentthe_content();
<?php the_content('more_link_text', strip_teaser, 'more_file'); ?>
more_link_textThe link text to display for the "more" link. Defaults to '(more...)'. <?php the_content('More', strip_teaser, 'more_file'); ?> |
|
strip_teaserShould the text before the "more" link be hidden (TRUE) or displayed (FALSE). <?php the_content('more_link_text', TRUE, 'more_file'); ?> |
|
more_fileFile the "more" link points to. Defaults to the current file. <?php the_content('more_link_text', strip_teaser, 'more.php'); ?> |
|
Displays the contents of the current post. This tag must be within The_Loop.
Post Content (RSS)the_content_rss();
<?php the_content_rss('more_link_text', strip_teaser, 'more_file'),cut, encode_html; ?>
more_link_textThe link text to display for the "more" link. Defaults to '(more...)'. <?php the_content_rss('More', strip_teaser, 'more_file'),cut, encode_html; ?> |
|
strip_teaserShould the text before the "more" link be hidden (TRUE) or displayed (FALSE). <?php the_content_rss('more_link_text', TRUE, 'more_file'),cut, encode_html; ?> |
|
more_fileFile the "more" link points to. Defaults to the current file. <?php the_content_rss('more_link_text', strip_teaser, 'more.php'),cut, encode_html; ?>> |
|
cutNumber of words displayed before ending content. Default is 0 (display all). <?php the_content_rss('more_link_text', strip_teaser, 'more_file'),5, encode_html; ?>> |
|
encode_htmlDefines html tag filtering and special character (e.g. '&') encoding. <?php the_content_rss('more_link_text', strip_teaser, 'more_file'),cut, 1; ?>> |
|
Displays the content of the current post formatted for RSS. This tag must be within The_Loop.
Post Excerptthe_excerpt();
<?php the_excerpt(); ?>
|
Displays the excerpt of the current post with [...] at the end, which is not a "read more" link. If you do not provide an explicit excerpt to a post (in the post editor's optional excerpt field), the first 55 words of the post's content are used. Also in the latter case, HTML tags and graphics are stripped from the excerpt's content. This tag must be within The Loop.
Post Excerpt (RSS)the_excerpt_rss();
<?php the_excerpt_rss(); ?>
|
Displays the excerpt of the current post formatted for RSS.If you do not provide an explicit excerpt to a post (in the post editor's optional excerpt field), the first 55 words of the post's content are used. This tag must be within The_Loop.
Previous Post Linkprevious_post_link();
<?php previous_post_link('format', 'link', in_same_cat, 'excluded_categories'); ?>
formatFormat string for the link. This is where to control what comes before and after the link. '%link' in string will be replaced with whatever is declared as 'link' (see next parameter). 'Go to %link' will generate "Go to <a href=..." Put HTML tags here to style the final results. Defaults to '« %link'. <?php previous_post_link('Link: %link', 'link', in_same_cat, 'excluded_categories'); ?> |
|
linkLink text to display. Defaults to previous post's title ('%title'). <?php previous_post_link('format', 'Previous Post', in_same_cat, 'excluded_categories'); ?> |
|
in_same_catIndicates whether previous post must be within the same category as the current post. If set to TRUE, only posts from the current category will be displayed. <?php previous_post_link('format', 'link', TRUE, 'excluded_categories'); ?> |
|
excluded_categoriesNumeric category ID(s) from which the previous post should not be listed. Separate multiple categories with and; example: '1 and 5 and 15'. There is no default. <?php previous_post_link('format', 'link', in_same_cat, '2'); ?> |
|
Used on single post permalink pages, this template tag displays a link to the previous post which exists in chronological order from the current post.
Next Post Linknext_post_link();
<?php next_post_link('format', 'link', in_same_cat, 'excluded_categories'); ?>
formatFormat string for the link. This is where to control what comes before and after the link. '%link' in string will be replaced with whatever is declared as 'link' (see next parameter). 'Go to %link' will generate "Go to <a href=..." Put HTML tags here to style the final results. Defaults to '« %link'. <?php next_post_link('Link: %link', 'link', in_same_cat, 'excluded_categories'); ?> |
|
linkLink text to display. Defaults to next post's title ('%title'). <?php next_post_link('format', 'Next Post', in_same_cat, 'excluded_categories'); ?> |
|
in_same_catIndicates whether next post must be within the same category as the current post. If set to TRUE, only posts from the current category will be displayed. <?php next_post_link('format', 'link', TRUE, 'excluded_categories'); ?> |
|
excluded_categoriesNumeric category ID(s) from which the next post should not be listed. Separate multiple categories with and; example: '1 and 5 and 15'. There is no default. <?php next_post_link('format', 'link', in_same_cat, '2'); ?> |
|
Used on single post permalink pages, this template tag displays a link to the next post which exists in chronological order from the current post.
Post Nav Linksposts_nav_link();
<?php posts_nav_link('sep','prelabel','nxtlabel'); ?>
sepText displayed between the links. <?php posts_nav_link(',','prelabel','nxtlabel'); ?> |
|
prelabelLink text for the previous page. <?php posts_nav_link('sep','»','nxtlabel'); ?> |
|
nxtlabelLink text for the next page. <?php posts_nav_link('sep','prelabel','«'); ?> |
|
Displays links for next and previous pages. Useful for providing "paged" navigation of index, category and archive pages.
Post Metathe_meta();
<?php the_meta(); ?>
|
Displays an unordered list of meta "key:value" pairs, or the post-meta, for the current post. Must be used from within The_Loop.
Post Tagsthe_tags();
<?php the_tags('before', 'separator', 'after'); ?>
beforeText to display before the actual tags are displayed. Defaults to Tags: <?php the_tags('Post Tags:', 'separator', 'after'); ?> |
|
seperatorText or character to display between each tag link. The default is a comma (,) between each tag. <?php the_tags('before', '|', 'after'); ?> |
|
afterText to display after the last tag. The default is to display nothing. <?php the_tags('before', 'separator', '.'); ?> |
|
Displays a link to the tag or tags a post belongs to. If no tags are associated with the current entry, the associated category is displayed instead. This tag should be used within The Loop.
Post Countwp_count_posts();
<?php wp_count_posts('type', 'status'); ?>
typeType of row in wp_posts to count where type is equal to post_type. <?php wp_count_posts('post', 'status'); ?> |
|
statusStatus of row in wp_posts to count where status is equal to post_status. <?php wp_count_posts('type', 'draft'); ?> |
|
Returns the count of the rows in wp_posts that meet the post_type and post_status designated.
Tag Template Tags
Tag Cloudwp_tag_cloud();
<?php wp_tag_cloud(); ?>
smallestThe text size of the tag with the smallest count value (units given by unit parameter). <?php wp_tag_cloud(); ?> |
|
largestThe text size of the tag with the highest count value (units given by the unit parameter). <?php wp_tag_cloud(); ?> |
|
unitUnit of measure as pertains to the smallest and largest values. This can be any CSS length value, e.g. pt, px, em, %; default is pt (points). <?php wp_tag_cloud(); ?> |
|
numberThe number of actual tags to display in the cloud. (Use '0' to display all tags.) <?php wp_tag_cloud(); ?> |
|
formatFormat of the cloud display. <?php wp_tag_cloud(); ?> |
|
orderbyOrder of the tags. <?php wp_tag_cloud(); ?> |
|
orderSort order. <?php wp_tag_cloud(); ?> |
|
excludeComma separated list of tags (term_id) to exclude. For example, 'exclude=5,27' means tags that have the term_id 5 or 27 will NOT be displayed. Defaults to exclude nothing. <?php wp_tag_cloud(); ?> |
|
includeComma separated list of tags (term_id) to include. For example, 'include=5,27' means tags that have the term_id 5 or 27 will be the only tags displayed. Defaults to include everything. <?php wp_tag_cloud(); ?> |
|
Displays a list of tags in what is called a 'tag cloud', where the size of each tag is determined by how many times that particular tag has been assigned to posts.
Tag Arrayget_the_tags();
<?php get_the_tags(); ?>
Member Variables |
term_idthe tag ID |
namethe tag name |
sluga slug generated from the tag name |
term_groupthe group of the tag, if any |
taxonomyshould always be 'post_tag' for this case |
descriptionthe tag description |
countnumber of uses of this tag, total |
Returns an array of objects, one object for each tag assigned to the post. This tag must be used within The Loop..
Tag Listget_the_tag_list();
<?php get_the_tag_list(); ?>
|
Generates a HTML string of the tags associated with the current post. The name of each tag will be linked to the relevant 'tag' page.
Tag Title for Current Pagesingle_tag_title();
<?php single_tag_title('prefix', 'display'); ?>
prefixText to output before the tag title. <?php single_tag_title('Tag:', 'display'); ?> |
|
displayDisplay the tag's title (TRUE) or return it for use in PHP (FALSE). <?php single_tag_title('prefix', 'TRUE'); ?> |
|
Generates a HTML string of the tags associated with the current post. The name of each tag will be linked to the relevant 'tag' page.
WordPress Deutschland Doku steht unter einer Creative Commons Namensnennung-Keine kommerzielle Nutzung-Weitergabe unter gleichen Bedingungen 3.0 Deutschland Lizenz.
© 2007 - 2024 bueltge.de | Validate: CSS · xHTML