How to block or hide just part of a page

4 Replies ·

  1. Members easily allows me to hide the Settings page in VFB. But, all I really want to hide is the license key information. Is there a way to be that specific and hide just part of a page?

  2. Steve Biese

    I paid $29 for what I thought would get me tech support. If I was mistaken about that, please credit my account back and I’ll find another similar plugin that the users can get support to respond to their inquiries.

    Thank you

  3. Justin Tadlock

    Sorry for the late reply. I wasn’t online for a good portion of today due to storms in my area knocking out the electricity.

    I’m not sure what VFB is. If it’s an admin page of a plugin you’re referring to, Members itself has no control over what you can/cannot see in terms of admin pages. That’s up to the plugin author and what capabilities that plugin has available. Members merely allows you to assign capabilities to roles.

    With that said, Members does have custom functions and shortcodes that allow you to hide things on a smaller level. That depends on whether you have access to the code for this particular settings page in VFB.

  4. Steve Biese

    That’s interesting. When you go to Edit Role, there’s a whole section called Custom which has all the back-end pages of the VFB Pro (I’m pretty sure it’s ‘Visual Form Basic’) form plugin. Does Members go out and create these custom sections on the fly?
    The “Settings” page is where the License Key is and Members can easily block this page with the option vfb_edit_settings. Check this off and the whole VFB Pro Settings page will disappear.

  5. Justin Tadlock

    When you go to Edit Role, there‚Äôs a whole section called Custom which has all the back-end pages of the VFB Pro (I’m pretty sure it’s ‘Visual Form Basic’) form plugin. Does Members go out and create these custom sections on the fly?

    The “Custom” section is a list of capabilities that Members reads from existing user roles. The vfb_* caps are likely added to the administrator role when you first activate the plugin. Members reads those caps and makes them available.

    The caps themselves would be created by VFB.

    The “Settings” page is where the License Key is and Members can easily block this page with the option vfb_edit_settings. Check this off and the whole VFB Pro Settings page will disappear.

    That’s not exactly what’s happening. The following is a little technical, but I’ll try to explain what’s going on behind the scenes.

    The vfb_edit_settings and other vfb_* caps would be something created by the VFB plugin. Members recognizes these caps because both it and VFB work with the same, standard role/cap system in WordPress. What Membes does is read these caps and expose them to you, the user, in a user interface (the edit role screen), which lets you pick and choose the roles that you want to have them.

    That’s literally what Members’ Roles feature does. It’s just a user interface. It doesn’t actually “do” anything on its own (like show/hide stuff).

    vfb_edit_settings is actually meaningless as far as Members is concerned. It’s just an arbitrary ID. The “hiding/showing” of the page is most likely handled by WordPress and VFB via the standard admin menu functions in WordPress.


    What I’m getting at is that in order to “hide” or “show” a specific part of a settings page, it’d require the code for doing the hiding/showing to be within the VFB plugin itself.

    The best course of action is to talk with the VFB plugin author to see if they’d be willing to add a new capability for just the license key part of the page. Something like vfb_edit_license_key. That way, you can assign it via the Members plugin Edit Role screen.