Hi Vanesa,
If you’d like to apply the restriction directly to your PHP template files, then you could either make use of the do_shortcode method (https://developer.ww.wp.xz.cn/reference/functions/do_shortcode/) to insert the [restricted] shortcodes directly into your code, or you could make use of our available public functions to create conditional functionality, as showcased in our tutorial video here: https://www.youtube.com/watch?v=bKiJAjq7PhQ.
Hello,
if I use the shortcode method (https://developer.ww.wp.xz.cn/reference/functions/do_shortcode/) how can I add there shortcode options – for example redirect pages for login-logout-toggle shortcode?
Thanks.
Hi morbid,
You can just add this straight into the shortcode, like you’d do if you were adding the shortcode to a page. For example:
echo do_shortcode("[login-logout-toggle login_redirect_page='http://www.first.url/' logout_redirect_page='http://www.second.url/']");