-
Notifications
You must be signed in to change notification settings - Fork 24
Template Tags
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.
The PressForward Plugin is developed and maintained by the Roy Rosenzweig Center for History and New Media at George Mason University as part of the PressForward Project, generously funded by the Alfred P. Sloan Foundation. Our developers include Aram Zucker-Scharff, Boone B. Gorges, and Jeremy Boggs. PressForward is free to use and modify under an AGPLv3 license.
- Home
- Installation Instructions
- Quick Start Guide
-
User Manual
- Installing PressForward
- Installing and Using the “Nominate This” Bookmarklet
- Subscribe to RSS/Atom Feeds
- Using the All Content Page: How to Read, Nominate, and Add Comments to Items
- Using the Nominated Page: How to Review, Select, and Publish Nominations
- Posting Nominated Items to WordPress
- Managing Feeds Using the Subscribed Feeds Page
- Preferences
- Tools
- Folders
- FAQ
- Recommended Server Configuration
- Developer Handbook