Simple Membership Plugin › Forums › Simple Membership Plugin › Bug report : shortcode is visible
- This topic has 5 replies, 2 voices, and was last updated 11 years ago by
mbrsolution.
-
AuthorPosts
-
September 13, 2015 at 6:46 am #3041
jimmy
Participantnot 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?
September 13, 2015 at 11:58 am #3045mbrsolution
ModeratorHi, 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
September 14, 2015 at 7:11 pm #3053jimmy
Participanthi 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 visibleSeptember 14, 2015 at 10:21 pm #3055mbrsolution
ModeratorHi, 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?
September 15, 2015 at 3:22 am #3059jimmy
ParticipantI 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?
September 15, 2015 at 3:55 am #3060mbrsolution
ModeratorHi 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
-
AuthorPosts
- You must be logged in to reply to this topic.