- This topic has 5 replies, 2 voices, and was last updated 10 years, 7 months ago by .
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
- You must be logged in to reply to this topic.
WordPress Membership Plugin
Simple Membership Plugin › Forums › Simple Membership Plugin › Bug report : shortcode is visible
not sure if you guys are aware of this issue but if I create a page X with a short code as content [shortcode] and I check “Yes, Protect this content.” the content of short code is still visible to general public. can you solve this issue?
Hi, can you provide more information. For example what plugin are you using to create shortcodes of content? What other action have you carried out which displays the content even though you have protected the page or post? Can you also share your URL?
Thank you
hi there, no there is no third party plugin. It is a theme I am developing.
okay, here is a scenario which you can test :
– I create a page named “X”
– Page content a shortcode link [foobar]
– Shortcode is :
function foobar_func( $atts ){
// returns foo and bar to the page X
return "foo and bar";
}
add_shortcode( 'foobar', 'foobar_func' );
– I check “Yes, protect this content”
– I visit the website as a guest and “foo and bar” is visible
Hi, thank you for sharing more information. Where in the template are you injecting the function above? For example does the function appear towards the footer or towards the top?
I am not sure what you mean. That shortcode function is in “functions.php”. And in the “New Page” I am using [foobar] to display a simple message which should have been invisible from public. Can you do a simple test on your end?
Hi I just tested your function in my test environment. When I enable the post to be protected nothing shows. When I disable the protection everything shows.
So I can confirm that the plugin works with your function. Therefore it is safe to say that it is your theme that is not coded correctly. Or maybe you have a plugin conflict.
Regards