in Tips and Tricks, WordPress

Restrict Any WordPress Post/Page for Any Specific User Role

Sometimes we need to restrict any specific wordpress post or page for any specific user role. For this there are lots of plugin. While replying to a facebook group post where someone asked something lightweight or no heavy plugin. So tried to write a simple one file plugin with hard coded page or post id and user role which can be used in theme. Here I am sharing the code if that helps other who is reading this article.

https://gist.github.com/manchumahara/b4930caec8119ecf258f70a6b7248d09