• Skip to primary navigation
  • Skip to main content
OsomCode

OsomCode

Awesome code tutorials for WordPress and Genesis

  • Subscribe
  • My account
    • Edit profile
    • Favorites
    • Update credit card
  • Login

Show a different Restrict Content Pro message on a specific page

Discover in this tutorial how to display a different message in the Restrict Content Pro box on a specific page using code.

By default, Restrict Content Pro (one of the most popular plugins for restricting content) only allows you to set a single restriction message from the settings area to appear over paid content if the user is not logged in.

But what if you want to show a different text on a specific page?

You can achieve this easily thanks to a filter in the plugin:

Change the Restrict Content Pro message on a specific page

Add the following code at the end of functions.php or in your functionality plugin:

To see this and another 839 code snippets of this website, login or subscribe here.

You got it.

In this case the page had the ID 4364 but you can change it to whatever you need.

You can get the page ID by checking the URL when you edit the page or, if you want to make it easier for yourself, get it displayed directly in the WordPress admin with this tutorial.

In the same way, you can replace the text with the one that suits you. 😉

Conclusions

Now you know how to modify the text displayed by Restrict Content Pro on a given page using code.

If you have any question, please leave it in the comments. And if you want to give me a suggestion for future snippets, please send it through the contact form.

Benefits of being a subscriber. 🙂

PHP Restrict Content Pro Shortcode

To leave read and make questions about this code, you can login or register.

  • About OsomCode
  • FAQ
  • Contact

Legal Notice · Privacy Policy · Cookie Policy · Terms and conditions
Copyright © 2023

Lost your password?