Available Magic Tags in Revive Old Posts

This is a Pro Feature! Purchase the Pro version of  Revive Old Posts here

Revive Old Posts Pro comes with built-in placeholders or "magic tags" that you can use within your Custom Messages or the Additional Text area in the Post Format settings!

Currently available magic tags are as follows:

Magic tag Details
{title} The post title
{url} The post link
{comment_count} The number of comments on the post. Includes the word "comments"
{author} The post author
{date} The post publish date
{week_day} The day of the week
{the_date} The current date. Uses format set in your WordPress general settings.
{login} The login URL, if WooCommerce is installed this will be the My Account login URL
{price} (WooCommerce & BigCommerce) The product price
{sale_price} (WooCommerce & BigCommerce) The product sale price
{sales} (WooCommerce & BigCommerce) The number of sales of the product shared. Includes the word "sales"
{stock_status} (WooCommerce & BigCommerce) Outputs "In Stock" if the product is in stock. Outputs nothing if the product is out of stock.
{stock_quantity} (WooCommerce & BigCommerce) Outputs the stock quantity. If there are no more left in stock magic tag outputs nothing.

For the  {comment_count} and {sales} magic tags; the plugin will not display any output if they are 0. The point at which the output is displayed can be manipulated using the following hooks:



Both hooks accept an integer and can be used as follows:

	function rop_increase_sales_magic_tag(){
	//Magic tag would only output if product has more than 10 sales
	return 10;
	add_filter('rop_show_after_n_sales', 'rop_increase_sales_magic_tag' );
	function rop_increase_comments_magic_tag(){
	//Magic tag would only output if post has more than 4 comments
	return 4;
	add_filter('rop_show_after_n_comments', 'rop_increase_comments_magic_tag' );

To use the code above start off by adding it in either your child theme's functions.php file or create a site-specific plugin using the following plugin:  https://wordpress.org/plugins/pluginception/

All you need to add is the plugin name and then copy the code below and enter it into the editing area, after pasting the code save your changes and head over to your Plugins area and activate the plugin to see the changes.

We'll keep adding more magic tags as we think of them! Have an idea for a magic tag?  Let us know here.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.