Adding redirect url to post restriction shortcodesI
I am going to restrict some posts for specific user id only, for other users who doesn’t have access to the post will be redirect to a URL. Can you guys consider add this feature to shortcodes here, https://wpfusion.com/documentation/getting-started/shortcodes/. Also consider to remove posts for post queiry filter for users who dosen’t have access to the post. it should be good feature for private posts for certain users. such as some notification posts etc.. Thanks
Hi Jianfeng. A shortcode isn’t the appropriate way to set a redirect on a post. That’s because the post needs to load fully before the shortcode is executed, so it’s bad for performance.
Of course you can already redirect away from a post based on tags (https://wpfusion.com/documentation/getting-started/access-control/#meta-box). If you want to conditionally redirect from a post based on user ID, we let you customize the functionality further using the wpf_redirect_url filter https://wpfusion.com/documentation/filters/wpf_redirect_url/