Custom Content Shortcode
[resolved] Request: If Role - extend if login to support user role? (3 posts)

  1. Agent8
    Posted 1 year ago #


    Great plugin. I'm using the if login function to great effect. But it would be even more useful if it were possible to target different user roles.

    As at the moment I have two different site member roles and want to serve them up different content.



  2. Eliot Akira
    Plugin Author

    Posted 1 year ago #


    Thank you for the feedback. Sure, targeting user roles sounds useful - I'll look into adding that feature. I'm a bit busy until next week, so the next update might take some days.

    I'll let you know on this thread when I get it implemented.

  3. Eliot Akira
    Plugin Author

    Posted 1 year ago #

    In the latest update, I added role and capable parameters to the [is] shortcode. Please refer to the documentation under Settings -> Custom Content -> User, for details on the new parameters.

    To check if a user has a role:

    [is role="editor"]
        You are an editor.

    For ease of use, I added a listing of available user roles and capabilities in the Content Overview page, under Dashboard -> Content.

    Let me know if that works for your purpose!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic