Find out in this tutorial how to remove the Restrict Content Pro metabox in certain post types using code.
The Restrict Content Pro plugin adds, in the administration part of the posts, a metabox at the end, below the content.
By default, this is added to all post types in your WordPress installation. But you may want to remove it from those where you do not want to restrict the content.
This can be especially interesting to prevent clients from restricting content that they should not.
Let’s see how you can achieve this.
Snippet to hide the Restrict Content Pro metabox on some post types
Add the following code at the end of functions.php or in your functionality plugin:
To see this and another 1097 code snippets of this website, login or subscribe here.
With this code you get that the metabox is not displayed in the portfolio Custom Post Type.
If you want to prevent it from being displayed in several post types you only have to add one more line. This would be the necessary snippet to hide it also in the pages:
To see this and another 1097 code snippets of this website, login or subscribe here.
As you can see, you can hide it in all the post types you want in a simple way.
And you know that the less elements the clients see, the less they can mess up. 😉
Conclusions
Now you know how to hide the Restrict Content Pro metabox on the post types you choose.
Any questions? I read you in the comments.
And if you want to give me any suggestion for future tutorials, leave it in the contact form. Advantages of being a subscriber. 😉