Project

General

Profile

Template Tags

The following template tags are available for use in your theme:

Metadata

  1. amt_content_description() : prints the content's description as generated by Add-Meta-Tags.
  2. amt_content_keywords() : prints a comma-delimited list of the content's keywords as generated by Add-Meta-Tags.
  3. amt_metadata_head() : prints the full metadata for the head area as generated by Add-Meta-Tags.
  4. amt_metadata_footer() : prints the full metadata for the head area as generated by Add-Meta-Tags.
  5. amt_breadcrumbs() : prints an unordered list of semantic (Schema.org enabled) breadcrumbs. (how to use)
  6. 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:

  1. $size (string) (optional): any image size name defined by WordPress or theme/plugins. Default: thumbnail
  2. $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:

  1. $size: same as above.
  2. $user_id: same as above.
  3. $force_width (integer or null) (optional): If set, this width will be used on the img element, regardless of the retrieved image size.
  4. $force_height (integer or null) (optional): If set, this height will be used on the img 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:

  1. $size (string) (optional): any image size name defined by WordPress or theme/plugins. Default: thumbnail
  2. $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:

  1. $size: same as above.
  2. $user_id: same as above.
  3. $force_width (integer or null) (optional): If set, this width will be used on the img element, regardless of the retrieved image size.
  4. $force_height (integer or null) (optional): If set, this height will be used on the img element, regardless of the retrieved image size.