why are you using ‘name’ and ‘category_name’ at the same time?
@alchymyth. Sorry for the misleading explanation
I was trying to get a specific post within a specific category
Saying, I had 2 posts with the same name of "My Post" (ID = 1 and ID = 2) which is respectively belong to 2 categories cat1 and cat2. I was trying to get the post "My Post" in the cat1. That’s why my code was like above
So, what should I do? Thank you!
Maybe you guys should try this plugin:
http://wordpress.org/extend/plugins/download-monitor/
I have not tried it at all but in the plugin’s features it says
Member only downloads…
Also, this is the interesting topic in which I found the plugin:
http://wordpress.org/support/topic/how-to-restrict-file-downloads-to-specific-users?replies=22