Thread Starter
James
(@jmdesignsolutions)
Just to follow this up, the issue I’m having is that I have a page template with content not in the default WordPress body that I’d like to protect but I can’t seem to get it working using the short codes as the content is using an ACF repeater field which is in PHP.
@jmdesignsolutions – Wrap all your ACF code for output buffering then use do_shortcode and a concatenated string with the ob output.
ob_start();
// do acf rendering here
$content = ob_get_clean();
echo do_shortcode('[content_control]' . $content . '[/content_control]');
Hope that helps.
Thread Starter
James
(@jmdesignsolutions)
Hi,
Thanks for the help, I’ve added your code in my page template file placing my ACF code where your comment is but nothing has changed, the content still shows?
Is there anything else I need to add?
Thanks,
James
Thread Starter
James
(@jmdesignsolutions)
Ignore this, all sorted now.
Thanks for your help!
James
@jmdesignsolutions – Awesome, yea this solution is solid ;). We use it regularly when capturing content is required.
Btw, If you have a moment, I would very much appreciate if you could quickly rate the plugin, just to help us spread the word.