WordPress.org

Support

Support » Plugins and Hacks » Download Monitor » [Plugin: WordPress Download Monitor] How to restrict downloads to certain roles

[Plugin: WordPress Download Monitor] How to restrict downloads to certain roles

  • Hi all,

    I’m running a website with some free downloads and some others for members only.
    I have some levels of membership: level0 (suscribers), level1, etc.

    How can I restrict downloads only for level0 members but keeping all the free downloads open?
    I mean:
    – visitors can access only to free downloads
    – level0 (subscriber so it’s a member) can access only to free downloads
    – level1+ can access all downloads

    Thanks.

    Regards.

    http://wordpress.org/extend/plugins/download-monitor/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi
    I have this problem tooo
    I find some plugin for this but i could not work with them.
    You can search membership on wordpress.org
    If you find some thing that work pleas share with all people.
    Thanks

    @carbianco @onala

    I had a similar issue. I’m not sure if this will work for your scenario but I will try to explain what I ended up doing.

    I needed one page (/downloads-page) to display available downloads based on user type. I created 5 additional user types. There are several plugins out there that will allow you to do this. Or in your case you can just use the default level_0 or Level_1 capabilities to target users….

    Anyway, I created a page template for my /downloads-page and used some conditional logic to determine the users capabilities and then serve them customized content by using the default Download Monitor shortcodes.

    For example:

    [27 lines of code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

    Or in your case you don’t want to use the $user_roles to target users but instead their capabilities you could use:

    [Ditto]

    Hope that helps.

    @derekshirk Could you repost your reply using pastebin as it was moderated above. I would like to see your solution.

    Thanks

    Yea, I will re-post my solution as soon as possible.

    (Sorry, I forgot about the forum rules.)

    @carbianco @onala

    I am reposting my message since I forgot to use pastebin in my earlier post and therefore the code was moderated.

    I had a similar issue. I’m not sure if this will work for your scenario but I will try to explain what I ended up doing.

    I needed one page (/downloads-page) to display available downloads based on user type. I created 5 additional user types. There are several plugins out there that will allow you to do this. Or in your case you can just use the default level_0 or Level_1 capabilities to target users….

    Anyway, I created a page template for my /downloads-page and used some conditional logic to determine the users capabilities and then serve them customized content by using the default Download Monitor shortcodes.

    For example:

    http://pastebin.com/d5ZRsSg2

    Or in your case you don’t want to use the $user_roles to target users but instead their capabilities you could use:

    http://pastebin.com/jgfLXV24

    Hope that helps.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: WordPress Download Monitor] How to restrict downloads to certain roles’ is closed to new replies.
Skip to toolbar