• Resolved moto.hi

    (@dpricesf)


    I’m trying to restrict access to WPBakery button element to only logged in users of a profile group. I’ve tried doing this a couple of different ways but nothing has worked.

    Is there a way to use the short codes i.e. [um_loggedin] as an element class or ID??

    If not how do you restrict access to elements?

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Aswin Giri

    (@aswingiri)

    Hello @dpricesf

    Ultimate member does not have any way to restrict WPBakery elements based on logged-in status. But what you can do is, add some class to element (example: loggedin) and add CSS with hook:

    add_action('wp_head',function(){
        if( ! is_user_logged_in()){
        ?>
        <style>
            .loggedin {
                display:none;
            }
        </style>
        <?php
        }
    });

    If you completely want to remove elements for non-logged-in users, you will have to use javascript to remove elements from the page.

    I hope this was helpful.

    Plugin Support Ultimate Member Support

    (@ultimatemembersupport)

    Hello @dpricesf

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved…
    Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. 🙂

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

The topic ‘Restrict access to WPBakery elements’ is closed to new replies.