WordPress.org

Ready to get started?Download WordPress

Forums

s2Member Buttons
Remove the buttons in Forum (3 posts)

  1. Deyson
    Member
    Posted 1 year ago #

    Hello. I wanted to know if there is a way I can remove the buttons in my Forum.
    http://motion-master-templates.com/forum/how-to-and-troubleshooting/final-cut-x

    Thank you :)

    http://wordpress.org/extend/plugins/s2member-buttons/

  2. dweuste
    Member
    Posted 1 year ago #

    I came across this issue as well and figured out a way to make it work, so I thought I would share it with you.

    In the Plugin editor, find the s2member-buttons/s2memberbuttons.php file and look for the following code:

    function loggedin_button() {
       if ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages') ) {
         return;
       }

    So, basically I just changed the "current_user_can" to a permission only given to administrators like "create user" and so this is what that line looks like now:

    function loggedin_button() {
       if ( ! current_user_can('create_users') && ! current_user_can('edit_pages') ) {
         return;
       }

    So now, administrators still see it in the visual editor, but no one else does.

  3. Deyson
    Member
    Posted 1 year ago #

    Thank you! It worked! :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.