Hi,
Thank you for your interest in the plugin.
Yes, it’s possible. Please check out this article:
http://support.onepress-media.com/how-to-invoke-social-locker-outside-of-post-content-directly-via-php/
Also you can use a CSS selector to choose content to lock (it’s a part of the Batch Lock feature).
Paul
The example you give is perturbing: I don’t understant clearly what content is locked and it I have to change the code for each post I need to lock content.
Won’t this do the job ?
echo do_shortcode('[iscorrect]'.$text_to_be_wrapped_in_shortcode.'[/iscorrect]');
as seen in Codex here http://codex.ww.wp.xz.cn/Function_Reference/do_shortcode ?
I found another code: http://stackoverflow.com/questions/22431458/placing-php-code-in-social-locker-php-shortcode
It makes more sense to me.
Thanks, it’s more clear now – for me 🙂 – and I made it work !
May I suggest you to change your example as it’s very perturbing – for me – as the content you show is a Submit button. I thought at first that it was a button what needed to be pushed to share the content.
Maybe something else to lock will be more explicit (some dumb content).
You’re very welcome 🙂
Yes, you’re right. I will fix that.
Paul