May 10, 201214 yr Hello all, I've been tearing my hair out trying to use shortcodes to restrict content to a wordpress template. I think I almost have it but I can't get how to refer to the content in the template that I want to block <?php $restriction = '../category/recrutement'; $content = '[access role="editor"]'.$restriction.'[/access]'; echo do_shortcode($content); ?> Ideally I want the page to no longer exist for those without access. I would love it if someone could give me a clue. Thanks in advance.
Create an account or sign in to comment