• Resolved jpstudiodesigns

    (@jessicapschultz)


    I am simply adding your shortcode to my account page (tested other pages too) and the content is not showing. I use your plugin on another website and it works fine, is there a troubleshooting list? I could not fine one. Here is my shortcode, I have tried both options you provide: [private and ubn_private]
    [ubn_private role=”wholesale-only”] text here[/ubn_private]
    [ubn_private role=”wholesale”]text here[/ubn_private]

    I have double checked my id for wholesale user role and it is correct.
    Role=Wholesale Customer
    ID=wholesale

    thank you for any help you can provide.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Aldo Latino

    (@aldolat)

    Hello,
    you cannot use a custom role directly in the shortcode, but one of the standard WordPress roles:

    1. Administrator
    2. Editor
    3. Author
    4. Contributor
    5. Subscriber

    If you want to use custom roles, you have to map your custom role to one of the capabilities created by Private Content. For example, if you have the “Wholesale Customer” role, you can make that “Wholesale Customer” can read the notes dedicated to other WordPress roles, such as Contributor for example. In other words, “Wholesale Customer” can read notes that have been written for Contributor. They will share the same notes.

    Using a third party plugin such as “User Role Editor” or “Members”, you can map one of these roles:

    1. read_ubn_editor_notes
    2. read_ubn_author_notes
    3. read_ubn_contributor_notes
    4. read_ubn_subscriber_notes

    to your custom role “Wholesale Customer”.

    After having made that, use a shortcode like this:

    [private role="contributor-only"]Text for Contributors only[/private]

    Once a “Wholesale Customer” has been logged in, he will read the notes dedicated to contributors-only. Please note that we are using role="contributor-only", not simply role="contributor".

    Let me know, please.

    Thread Starter jpstudiodesigns

    (@jessicapschultz)

    perfect! thanks. I misunderstood what I read before, I thought you mentioned it works with custom roles but I missed the part about mapping them. I appreciate your help and quick response 🙂

    Plugin Author Aldo Latino

    (@aldolat)

    You’re very welcome!

    I misunderstood what I read before, I thought you mentioned it works with custom roles but I missed the part about mapping them.

    Just now I expanded the FAQ about custom roles in the main page of the plugin. 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘cannot get it to work’ is closed to new replies.