• Resolved benithomas

    (@benithomas)


    I can’t find anyone to help with this problem. Please, I’d love some help!

    Background:
    – Our site is hosted in Flywheel
    – We are using the Divi theme (paid theme)
    – We are using the Memberpress membership plugin (paid plugin)

    Problem
    – The memberpress theme allows me to restrict (show/hide) content based on if someone is a member or not using shortcodes. Here is a list of the possible shortcodes: https://docs.memberpress.com/article/112-available-shortcodes. I can do this based on if they’re logged in or rules I set up for each level of membership. However, I can only use these shortcodes in a text module. I can’t use them if I create button, image, blog, or any other module.
    – I’d like to customize the homepage based on if a user is logged in or not. For example, if they are logged in, they will see restricted content and links to member only pages. If they are not logged in, there will be information about the membership and a button to “join now.”
    – I don’t need to use the memberpress shortcodes if there is a way to code this based on the user role in wordpress. Also, for clarification, I can easily restrict pages or posts based on membership with memberpress but I’m not able to show/hide specific elements on a page.

    Thank you for any help with this!

    • This topic was modified 5 years, 11 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi

    Please check this plugin https://ww.wp.xz.cn/plugins/content-control/

    I have not tested it myself but seeing the description looks like it fits your requirement. There’s a custom message option as well.

    Kind regards

    Thread Starter benithomas

    (@benithomas)

    Thank you Prashant! This looks like it will work.

    I did find another way to do it in the Divi theme. I used the plugin Page Builder Everywhere. With that plugin you can put divi elements inside of a text module. Then i can use the memberpress shortcodes before and after the element in the text module. It is working great. I also talked with memberpress and they said they will soon release an integration to make this easier. Now I have a few different ways to do this.

    Thanks

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

The topic ‘Restrict Content based on User Role’ is closed to new replies.