This plugin can hide portions of the text to some users. This plugin does only this thing. This means that you can hide a link to a PDF document and, instead, show it to other users.
When you hide a portion of text to some users, you can use a dedicated option of the shortcode to show an alternate message to the unauthorized users, for example: “Hey, if you login, you can see the link to the PDF!”.
The option is alt="Public text to show to anyone"
. For example:
[private role="author" alt="You have not rights to read this."]Text for authors only[/private]
The text “Text for authors only” will be shown to authorized users. The text “You have not rights to read this.” will be shown to unauthorized users.
Let me know if it’s clear.
Hi, thanks for your reply
OK, so to confirm I can hide text / links on a page to a logged out users, eg
Click this link… (for logged in users)
You do not have the rights to view.. (for non-logged in users)
But anyone who shares the actual PDFs url, eg sitename.com/wp-content/uploads/filename.pdf
anyone they share it with will be able to see it, there’s no way around that?
thanks in advance
Yes, the solution is to use a plugin made for this purpose. My plugin is a simple plugin to hide portions of text. If you want to share documents privately, so that only the intended users can download them, you have to use a different plugin, for example this or others: search the WP directory for this.