• Resolved bnjewell

    (@bnjewell)


    I’ve been using WP-Mem shortcodes to conditionally display content based on user roles. It works fine for every user role except for the new role “Affiliate” created by the Yith WooCommerce Affiliates plugin.

    Here’s the shortcode and syntax in question:

    [wpmem_logged_in role=affiliate]AFFILIATES SEE THIS[/wpmem_logged_in]

    The text that should display here doesn’t show up on the front end. The shortcode works if I swap in a different user role, but it’s not displaying what it should to affiliate users.

    Any ideas?

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Chad Butler

    (@cbutlerjr)

    I would double check that “affiliate” is the actual slug of the role. If it’s created by another plugin, does the plugin add a prefix to the role to identify it? Another thing to consider is that it is case sensitive, and although generally it’s going to be all lowercase, double check this to make sure it’s not “Affiliate”.

    Thread Starter bnjewell

    (@bnjewell)

    That did the trick — the shortcode slug was different than the shortcode name. Thanks for the help!

    Brian

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Shortcode not working with Affiliate user role’ is closed to new replies.