Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Possible Duplicate:
How to Protect Uploads, if User is not Logged In?

I know how to mark a Page or Post as visible only to members, using the Member Access plugin. This way, the public cannot view them; instead, you have to log in to see the page.

How do I mark a PDF or other Media upload as visible only to members?

share|improve this question

marked as duplicate by Rarst Nov 17 '12 at 19:23

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
you mean that attachments should not be accesible to not loged in users yes? And you want that all attachments (exept images) to be non visible to non logged in yes? Forget about marking attachments, nobody will make plugin just for you, so don't even think that somebody will even do that but i may help with hidding. –  Tommixoft Jun 5 '12 at 20:46
    
@Tommix, I mean that specific attachments I designate should be accessible only to logged-in users (not-logged-in users should be unable to view them; to view them, you have to log in). Not all attachments, only some specific ones that I designate. –  D.W. Jun 6 '12 at 1:05
add comment

1 Answer 1

up vote 1 down vote accepted

Searching this Stack, I can see two possible solutions for this question (not tested).

One

The answer is not fully developed, but can provide some insight.
Restricting access to files within a specific folder

Two

How to Protect Uploads, if User is not Logged In?
Frank Bueltge's answer seems interesting but the code is quite complex. As he himself admits his english is nasty, but I can assure his coding skills are superb :)

And the answer provided by hakre could be operational:

  • Protecting one or more folders inside /wp-content/uploads/ through .htaccess as detailed there.
  • Moving the desired files to this upload folders according to User or Post-ID, and for that the answer I provide to this question should do it. And, with the examples provided, maybe you can think of other kind of filtering.
share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.