On my website i would like to display the social locker wordpress plugin around a custom field.
<?php echo do_shortcode('[sociallocker]'.$to_lock.'[/sociallocker]');?>
Here is my custom field
<?php the_field('link'); ?>
Social locker requires a open and close shortcode:
[sociallocker id="16619"]
[/sociallocker]
The following does not work correctly:
<?php echo do_shortcode('[sociallocker id="16619"]'); ?>
<?php the_field('link'); ?>
<?php echo do_shortcode('[/sociallocker]'); ?>
<?= get_field ('link'); ?>instead of<?php the_field('link'); ?>