Shortcodes in Template
-
How can I use shortcodes to restrict content in a custom template file?
I would like to check if the user has access to a specific plan. If he does, show im a template partial. If he doesn’t show him another template partial.
Example code:
<?php echo do_shortcode(“[arm_restrict_content plan=’5,” type=’show’]”); ?>
<?php get_template_part(‘template-parts/show-video-course’); ?>
<?php echo do_shortcode(“[armelse]”); ?>
<?php get_template_part(‘template-parts/restricted-content’); ?>
<?php echo do_shortcode(“[/arm_restrict_content]”); ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Shortcodes in Template’ is closed to new replies.