Customizing The Restriction (Sorry) Page of PDF viewer for WordPress

by | Last updated Feb 1, 2024 | Solutions, Tutorial / How to | 0 comments

If you’re running a website that offers PDF files for download or viewing, you might want to restrict access to certain files to certain users. Fortunately, PDF viewer for WordPress and WP File Access Manager makes this easy to do.

With these two plugins, you can set permissions on your PDF files so that only certain users can view them. If a user tries to access a PDF file they’re not allowed to see, they’ll see a “sorry” page instead. And with the .pvfw-not-allowed CSS class, you can customize this page to match your site’s look and feel.

Here’s how to get started:

  1. Install PDF viewer for WordPress and WP File Access Manager

If you haven’t already, install these two plugins on your WordPress site. They’re available on CodeCanyon.

  1. Upload your PDF files

Once you have the plugins installed, upload your PDF files to your WordPress site using PDF viewer for WordPress. Be sure to set the file’s permissions using WP File Access Manager.

  1. Customize the “sorry” page

To customize the sorry page, you need to add some code to your website. The code can be found at this GitHub link:

Once you have the code, you can add it to your website by following these steps:

  1. Copy the code from the GitHub link.
  2. Log in to your website’s WordPress dashboard.
  3. Go to Appearance > Theme Editor.
  4. Click on the “functions.php” file on the right-hand side.
  5. Scroll down to the bottom of the file and paste the code you copied earlier.
  6. Click the “Update File” button to save the changes.

That’s it! You have now customized the sorry page for protected PDF files. Viewers who are not allowed to see the PDF will be redirected to this page, and you can customize it however you like using CSS.



Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Posts

Check out our Plugins

TNC FlipBook - PDF viewer for WordPress is the best-selling premium PDF Reader plugin for WordPress on CodeCanyon (7500+ Sales) since 2014.

Shopify App that can transform images and PDF files to FlipBook on your Shopify store with just a few clicks.

Upload files for specific visitors and restrict them from others by controlling the access with this plugin.

Ready to use Webflow Templates by ThemeNcode with latest and trendy design. Check this out on Webflow Marketplace

Divi Modules, Child Themes, Layouts and many more. All built just for Divi. Make your website creation process easier with Divi.

Easily embed interactive FlipBooks by hosting your PDFs on our cloud platform. Enhance your website with engaging content today!.

Popular Post