Skip to content
jdunlevyST edited this page Sep 26, 2014 · 5 revisions

PressForward provides a number of built-in template tags to allow theme and plugin developers to better expose the metadata collected by PressForward as part of their sites.

The code behind these tags exists in a dedicated file called template-tags.php.

Template tags in PressForward follow the standard WordPress function-naming-pattern. Functions that start with get return the value, functions that start with the echo the value. All are meant to be used in The Loop.

These are the current available template tags:

  • get_the_source_title()

Returns the name of the site that hosted the aggregated item, as listed in that site's feed.

  • the_source_title()

Echoes the name of the site that hosted the aggregated item, as listed in that site's feed.

  • get_the_original_post_date()

Returns the date that the original aggregated item states it was posted on the site's feed. If no date was listed, then it will store the time and date in GMT that the item was retrieved. Item dates are stored in the format retrieved.

  • the_original_post_date()

Echoes the date that the original aggregated item states it was posted on the site's feed. If no date was listed, then it will store the time and date in GMT that the item was retrieved. Item dates are stored in the format retrieved.

  • get_the_item_author()

Returns the author listed for the aggregated item in the item's feed. It will be empty if no author was listed in the feed.

  • the_item_author()

Echoes the author listed for the aggregated item in the item's feed. It will be empty if no author was listed in the feed.

  • get_the_item_link()

Returns the URL to the original post.

  • the_item_link()

Echoes the URL to the original post.

  • get_the_item_feat_image()

Returns the URL of the featured image, if one was found via Readability, Nominate This or in the metadata of the feed.

  • the_item_feat_image()

Echoes the URL of the featured image, if one was found via Readability, Nominate This or in the metadata of the feed.

  • get_the_item_tags()

Returns a list of tags associated with the item, as set by the feed. This is a comma-separated string.

  • the_item_tags()

Echoes a list of tags associated with the item, as set by the feed. This is a comma-separated string.

  • get_the_repeats()

Returns a string with a number representing the number of times a particular URL has entered the system.

  • the_item_repeats()

Echoes a string with a number representing the number of times a particular URL has entered the system.

  • get_the_nomination_count()

Returns the number of times an item has been nominated.

  • the_nomination_count()

Echoes the number of times an item has been nominated.

  • get_the_nominators()

Returns an array of usernames that have nominated the current item.

  • the_nominators()

Echoes a comma-separated string of usernames that have nominated the current item.

  • get_the_word_count()

Returns the word-count of an item.

  • the_word_count()

Echoes the word-count of an item.