Support » Plugin: Download Monitor » How to filter downloads by 'req-role' custom field

  • exhtml

    (@exhtml)


    Hi everyone! Anyone knows how to retrieve the value of a custom field assigned to a download in WordPress Download Monitor? Concretely I wanted to use the built ‘req-role’ custom field (used to show files only to one determined user role), to filter the download list and show files that each custom role can download. I have read all the documentations and search all the forums but don’t find any answer about that.
    Thanks in advance!

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • skynetsolutionsinfo

    (@skynetsolutionsinfo)

    use 2 more plugins
    User Role Editor & User specific Content

    first create a users using User Role Editor
    e.g user-1 & user-2

    in Edit Download Information of Download ID 1
    use Custom fields
    Name=> req-role
    Value=> user-1

    in Edit Download Information of Download ID 2
    use Custom fields
    Name=> req-role
    Value=> user-2

    using with User specific Content Plugin

    [O_U user_role=”user-1″]
    <h2>User 1 content goes here</h2>
    [download id=1]
    [/O_U]

    [O_U user_role=”user-2″]
    <h2>User 2 content goes here</h2>
    [download id=2]
    [/O_U]

    Thanks for your answer, I’m using User Role Editor yet to crearte the user roles. Indeed, I was looking for a ‘more automated’ way of filtering the downloads list. Finally found a way to access the value of the req-role custom field:
    $d->meta[‘req-role’]
    So you can filter the download list for a concrete user-role.
    Hope it helps for anyone,

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to filter downloads by 'req-role' custom field’ is closed to new replies.