How Can We Help?
Shortcodes for Pay For Post with WooCommerce
Default Shortcode
[woocommerce-payperpost template='purchased' orderby='post_date' order='DESC']
Options
The base shortcode comes with a variety of options.
template
[woocommerce-payperpost template='purchased|has_access|remaining|all']
purchased
-
This is the default template. It displays all of the purchased posts to the current logged in user.
-
has_access
-
It displays all of the posts the current logged in user has access to. This is different than purchased because some content may be expired.
-
remaining
-
It displays all of the available protected posts which the current logged in user has yet to purchase.
-
all
-
This will output a list of all protected posts available for purchase.
-
orderby
[woocommerce-payperpost template='purchased' orderby='post_date|ID|title|menu_order']
post_date
-
This is the default orderby. It orders posts by the post_date.
-
ID
-
This orders posts by the post ID.
-
title
-
This orders posts by the post Title.
-
menu_order
-
This orders posts by the menu order.
-
order
[woocommerce-payperpost template='purchased' orderby='post_date' order='DESC']
DESC
-
This is the default order. It orders posts in descending order.
-
ASC
-
It orders posts in ascending order.
-
category_slug PREMIUM ONLY
[woocommerce-payperpost template='purchased' category_slug='beverages-cold-vault' order='DESC']
You can filter just by specific categories by inputting the category slug into the shortcode. If you want multiple categories you can separate them by commas. Category Parameters
tag PREMIUM ONLY
[woocommerce-payperpost template='purchased' tag='cover-story']
You can filter just by specific tags by inputting the tag slug into the shortcode. If you want multiple tags you can separate them by commas. Tag Parameters
product_ids PREMIUM ONLY
[woocommerce-payperpost template='purchased' product_ids='1225']
You can filter / group by a specific product_id or a set of product_id’s by inserting them into the shortcode. If you want multiple product_ids you can separate them by commas.
NEW Inline Shortcode PREMIUM ONLY
This shortcode is in BETA but will allow you to protect specific sections of content rather than the whole page!
[wc-pay-for-post-inline][/wc-pay-for-post-inline]
Options
paywall_message
-
By setting a value for the paywall_message you can override the default Content Restricted message.
-
Smart Tags / Tokens
{{products}}
-
This is the equivalent of the WooCommerce Shortcode [product ids={{product_id}}]
- Example
[wc-pay-for-post-inline paywall_message="You are missing out on a picture of a fish! Purchase this product {{products}}"]Your Protected Content[/wc-pay-for-post-inline]
-
{{add_to_cart}}
-
This is the equivalent of the WooCommerce Shortcode [add_to_cart id={{product_id}}]
- Example
[wc-pay-for-post-inline paywall_message="You are missing out on a picture of a fish! Purchase this product {{add_to_cart}}"]Your Protected Content[/wc-pay-for-post-inline]
-
{{add_to_cart_link}}
-
This will output standard
a
links with the name being Add {{PRODUCT NAME}} to Cart - Example
[wc-pay-for-post-inline paywall_message="You are missing out on a picture of a fish! Purchase this product {{add_to_cart_link}}"]Your Protected Content[/wc-pay-for-post-inline]
-
Product Unlocks Shortcode. PREMIUM ONLY
This shortcode is to be embedded on your WooCommerce Product Page. It will output a list of posts/pages that get unlocked if purchased.
[wc-pay-for-post-product-unlocks]