Support » Plugin: Members » Complex Criteria

  • 1earthsangha

    (@1earthsangha)


    I have content I need to show if a user does have role A and does not have role B. But it appears that nesting the members_access shortcode does not work:

    [members_access role=”A”]
    [members_access role=”B” operator=”!”]
    You are signed up for A but not B. Fill out this form to get B
    {form for user’s who have role A but not B}
    [/members_access]
    [/members_access]

    Any suggestions?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Justin Tadlock

    (@greenshady)

    WordPress God

    WordPress does not allow you to nest shortcodes of the same name. See: https://codex.wordpress.org/Shortcode_API#Nested_Shortcodes

    It’s possible to build a single custom shortcode to do what you want though. Feel free to shoot me an email if you want to talk through a custom project.

    1earthsangha

    (@1earthsangha)

    That makes sense.

    I think we can probably write a shortcode function for the specific need. But consider this a plug for supporting complex conditionals for role (or capability) criteria. 🙂

    Thanks for the quick reply!

    Kristin

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Complex Criteria’ is closed to new replies.