WordPress V2.xTemplate Tag Reference Guide as of Version 2.x
Presented by:
Author Tags
Authorthe_author();
Returns the URI of the page for an Author.
<?php get_Author_link($id); ?>
$id
Integer • Default: The current post ID, when used in The Loop.
(Optional) The numeric ID of the attachment.
Author Description the_author_description();
This Conditional Tag checks if an attachment is being displayed. An attachment is an image or other file uploaded through the post editor's upload utility. Attachments can be displayed on their own 'page' or template. For more information, see Using Image and File Attachments. This is a boolean function, meaning it returns either True or False.
<?php is_attachment(); ?>
No parameters.
Author Login the_author_login();
Outputs a hyperlink to the attachment file, or Missing Attachment if the attachment can't be found. The hyperlink contains either (1) a thumbnail or full-size image (as specified), if it exists; or (2) an icon representing the media type of the file, if it exists; or (3) the attachment title (as text).
<?php the_attachment_link($id, $fullsize, $permalink); ?>
$id
Integer • Default: the ID of the current post
(Optional) ID of the desired attachment.
$fullsize
Boolean • Default: false
(Optional) For an image attachment, use the original image (true) or Wordpress-generated thumbnail (false). If set to false and the thumbnail can't be found, the full-size image may be used instead.
$permalink
Boolean • Default: false
(Optional) Link to the attachment page (true) or directly to the file/image (false).
Author First Name the_author_firstname();
This function determines if a post's attachment is an image. It returns True if the attachment is an image, False if not.
<?php wp_attachment_is_image($post_id); ?>
$post_id
Integer • Default: 0
Integer ID of the post.
Author Last Namethe_author_lastname();
Returns an HTML image element representing an attachment file, if there is any, otherwise an empty string.
<?php echo wp_get_attachment_image($attachment_id, $size, $icon); ?>
$attachment_id
Integer • Default: none
ID of the desired attachment.
$size
String/Array • Default: 'thumbnail'
(Optional) Size of the image shown for an image attachment: either a string keyword (thumbnail, medium, large or full) or a 2-item array representing width and height in pixels, e.g. array(32,32). As of Version 2.5, this parameter does not affect the size of media icons, which are always shown at their original size.
$icon
Boolean • Default: false
(Optional) Use a media icon to represent the attachment.
Author Nickname the_author_nickname();
Returns an image representing an attachment file, if there is any. Else returns False.
<?php wp_get_attachment_image_src($attachment_id, $size, $icon); ?>
$attachment_id
Integer • Default: none
ID of the desired attachment.
$size
String/Array • Default: 'thumbnail'
(Optional) Size of the image shown for an image attachment: either a string keyword (thumbnail, medium, large or full) or a 2-item array representing width and height in pixels, e.g. array(32,32). As of Version 2.5, this parameter does not affect the size of media icons, which are always shown at their original size.
$icon
Boolean • Default: false
(Optional) Use a media icon to represent the attachment.
Author ID the_author_ID();
Returns an image representing an attachment file, if there is any. Else returns False.
<?php wp_get_attachment_link($id, $size, $permalink, $icon, $text); ?>
$id
Integer • Default: The current post ID, when used in a loop showing only attachments
ID of the desired attachment.
$size
String/Array • Default: 'thumbnail'
(Optional) Size of the image shown for an image attachment: either a string keyword (thumbnail, medium, large or full) or a 2-item array representing width and height in pixels, e.g. array(32,32). As of Version 2.5, this parameter does not affect the size of media icons, which are always shown at their original size.
$permalink
Boolean • Default: false
(Optional) Link directly to the attachment file/image (Default), or to the attachment page.
$icon
Boolean • Default: false
(Optional) Use a media icon to represent the attachment.
$text
String • Default false
(Optional) Displays a text link to the attachment.
Author Emailthe_author_email();
Retrieve attachment meta field for attachment ID. Returns False on failure.
<?php wp_get_attachment_metadata($post_id, $unfiltered) ?>
$post_id
Integer • Default: none
ID of the desired attachment.
$unfiltered
Boolean/Array • Default: false
(Optional) If true, filters are not run.
Author Website URLthe_author_url();
Retrieve attachment meta field for attachment ID. Returns False on failure.
<?php wp_get_attachment_metadata($post_id, $unfiltered) ?>
$post_id
Integer • Default: none
ID of the desired attachment.
$unfiltered
Boolean/Array • Default: false
(Optional) If true, filters are not run.
Author Linkthe_author_link();
Retrieve attachment meta field for attachment ID. Returns False on failure.
<?php wp_get_attachment_metadata($post_id, $unfiltered) ?>
$post_id
Integer • Default: none
ID of the desired attachment.
$unfiltered
Boolean/Array • Default: false
(Optional) If true, filters are not run.
Author AIM Screenname;the_author_aim()
Retrieve attachment meta field for attachment ID. Returns False on failure.
<?php wp_get_attachment_metadata($post_id, $unfiltered) ?>
$post_id
Integer • Default: none
ID of the desired attachment.
$unfiltered
Boolean/Array • Default: false
(Optional) If true, filters are not run.
Author Yahoo IM IDthe_author_yim();
Retrieve attachment meta field for attachment ID. Returns False on failure.
<?php wp_get_attachment_metadata($post_id, $unfiltered) ?>
$post_id
Integer • Default: none
ID of the desired attachment.
$unfiltered
Boolean/Array • Default: false
(Optional) If true, filters are not run.
Author Poststhe_author_posts();
Retrieve attachment meta field for attachment ID. Returns False on failure.
<?php wp_get_attachment_metadata($post_id, $unfiltered) ?>
$post_id
Integer • Default: none
ID of the desired attachment.
$unfiltered
Boolean/Array • Default: false
(Optional) If true, filters are not run.
Author Posts Linkthe_author_posts_link();
Retrieve attachment meta field for attachment ID. Returns False on failure.
<?php wp_get_attachment_metadata($post_id, $unfiltered) ?>
$post_id
Integer • Default: none
ID of the desired attachment.
$unfiltered
Boolean/Array • Default: false
(Optional) If true, filters are not run.
Author Listwp_list_authors();
Retrieve attachment meta field for attachment ID. Returns False on failure.
<?php wp_get_attachment_metadata($post_id, $unfiltered) ?>
$post_id
Integer • Default: none
ID of the desired attachment.
$unfiltered
Boolean/Array • Default: false
(Optional) If true, filters are not run.