Template Tags¶
- Table of contents
- Template Tags
The following template tags are available for use in your theme:
Metadata¶
amt_content_description()
: prints the content's description as generated by Add-Meta-Tags.amt_content_keywords()
: prints a comma-delimited list of the content's keywords as generated by Add-Meta-Tags.amt_metadata_head()
: prints the full metadata for the head area as generated by Add-Meta-Tags.amt_metadata_footer()
: prints the full metadata for the head area as generated by Add-Meta-Tags.amt_breadcrumbs()
: prints an unordered list of semantic (Schema.org enabled) breadcrumbs. (how to use)amt_local_author_profile_url()
: prints the URL to the page containing the local author profile in accordance to the relevant selection in the Add-Meta-Tags settings.
User image¶
amt_get_user_image_info()¶
amt_get_user_image_info( $size='thumbnail', $user_id=null )
Parameters:
$size
(string) (optional): any image size name defined by WordPress or theme/plugins. Default:thumbnail
$user_id
(integer or null) (optional): a numerical user ID. If missing, on content pages (is_singular()
) the current post author's ID is used or, on the author archive (is_author()
) the archive author's ID is used.
Returns:
- An array of the form:
$image_info = array( 'url' => (string), 'width' => (string), 'height' => (string), );
false
if no image could be found
amt_print_user_image()¶
amt_print_user_image( $size='thumbnail', $user_id=null, $force_width=null, $force_height=null )
Prints an img
HTML element.
Parameters:
$size
: same as above.$user_id
: same as above.$force_width
(integer or null) (optional): If set, this width will be used on theimg
element, regardless of the retrieved image size.$force_height
(integer or null) (optional): If set, this height will be used on theimg
element, regardless of the retrieved image size.
Term image¶
amt_get_term_image_info()¶
amt_get_term_image_info( $size='thumbnail', $term_id=null )
Parameters:
$size
(string) (optional): any image size name defined by WordPress or theme/plugins. Default:thumbnail
$term_id
(integer or null) (optional): a numerical term ID. If missing, on the category/tag/custom-taxonomy archives (is_category() || is_tag() || is_tax()
) the archive term's ID is used.
Returns:
- An array of the form:
$image_info = array( 'url' => (string), 'width' => (string), 'height' => (string), );
false
if no image could be found
amt_print_term_image()¶
amt_print_term_image( $size='thumbnail', $term_id=null, $force_width=null, $force_height=null )
Prints an img
HTML element.
Parameters:
$size
: same as above.$user_id
: same as above.$force_width
(integer or null) (optional): If set, this width will be used on theimg
element, regardless of the retrieved image size.$force_height
(integer or null) (optional): If set, this height will be used on theimg
element, regardless of the retrieved image size.