Tips and Tricks HQ Support Portal › Forums › WP eMember › WP eMember Troubleshooting › Error with Section Protection and WP e-Commerce Plugin
- This topic has 6 replies, 2 voices, and was last updated 13 years, 1 month ago by wholesalegoldgroup.
-
AuthorPosts
-
October 17, 2011 at 1:42 pm #4551wholesalegoldgroupMember
I wanted to protect a section of a page but when I place the [emember_protected] and [/emember_protected] around the code that displays my products managed by WP e-Commerce Plugin I am getting an error. Instead of showing the prices it only shows the code.
For example, inside the page I had the following code that I would place to display the products from a given category from the WP e-Commerce Plugin:
[emember_protected]
[wpsc_products category_url_name=’st-gaudens’]
[/emember_protected]
As you can see I placed the proper section protection code, but when a user logs in instead of seeing the products they only see the code:
[wpsc_products category_url_name=’st-gaudens’]
It seems like the section protection brackets are causing this error. Please help! Thanks!
October 18, 2011 at 12:54 am #37607adminKeymasterYou can only place a WordPress shortcode inside another WordPress shortcode (known as shortcode nesting) if both the shortcodes are created using the proper WordPress shortcode API. Just because something looks like a shortcode doesn’t mean it is implemented using WordPress’s shortcode API. So my question to you is the following:
Is the
[wpsc_products category_url_name='st-gaudens']
implemented using the WordPress shortcode API?Try this tweak here to see if it makes any difference:
October 18, 2011 at 3:08 pm #37608wholesalegoldgroupMemberthe codes I have are:
[emember_protected]
[wpsc_products category_url_name=’st-gaudens’]
[/emember_protected]
is this the correct shortcode nesting result?:
[emember_protected wpsc_products category_url_name=’st-gaudens’ /emember_protected]
October 18, 2011 at 11:53 pm #37609adminKeymasterThe following shortcode is not coming from one of our plugins so we can’t verify if it is implemented using the proper WordPress shortcode API (if you are using a shortcode from another plugin then only the developer of that plugin will know how he implemented that shortcode):
[wpsc_products category_url_name='st-gaudens']
Lets do this test which will give you more perspective into the shortcodes nesting:
1. Create a new WordPress page and place the following on that page (this is using shortcode nesting… one shortcode inside another):
[emember_protected]
[wp_eMember_edit_profile]
[/emember_protected]2. Save the page and view it.
3. Is the inner shortcode (the edit profile one) working or just showing the plain text?
October 21, 2011 at 9:22 pm #37610wholesalegoldgroupMemberThe inner shortcode is working with the test you supplied. It also works when I place it on a page protecting the shortcode from the WP e-Commerce Plugin, an example:
http://wholesalegoldgroup.com/buy-gold-coins/double-eagles-saint-gaudens-gold-coins
However when the user signs in, instead of showing the products from the WP e-Commerce shortcode, it just shows the short codes in plain text, like this: [wpsc_products category_url_name=’st-gaudens’]
October 21, 2011 at 10:57 pm #37611adminKeymasterI do not know how WP eCommerce implemented this shortcode that you are having trouble with so can’t really help as its not our plugin. you can try the tweak on this page to see if it makes a difference:
October 22, 2011 at 1:39 am #37612wholesalegoldgroupMemberthe tweak worked, thank you!
-
AuthorPosts
- You must be logged in to reply to this topic.