WordPress.org

Ready to get started?Download WordPress

Forums

Subscribe2
[resolved] Remove Subscribe2 Option from Profile page (5 posts)

  1. automationguru
    Member
    Posted 1 year ago #

    Hi,

    I have just installed Subscribe2 plugin. I want all my users to automatically subscribed so that they receive an email for each post. How can I remove Subscribe2 button from profile page.

    Please advice.

    Regards,
    Prabhat

    http://wordpress.org/extend/plugins/subscribe2/

  2. mattyrob
    Member
    Plugin Author

    Posted 1 year ago #

    @Prabhat,

    There is a filter in the plugin you can use to elevate the access capabilities to the profile page so that subscribers won't have access to it.

    It's described more fully in the FAQs but this should work:

    function s2_admin_changes( $capability, $menu ) {
        if ( $menu == 'user' ) {
            return 'manage_options';
        }
        return $capability;
    }
    add_filter('s2_capability', 's2_admin_changes', 10, 2);
  3. automationguru
    Member
    Posted 1 year ago #

    Hi Matthew,

    I put the above function in subscribe2.php and it works great.

    Thanks a lot :)

    Regards,
    Prabhat

  4. automationguru
    Member
    Posted 1 year ago #

    Hey Matthew,

    How can I make disable this menu for Authors as well ?

    Regards,
    Prabhat

  5. mattyrob
    Member
    Plugin Author

    Posted 1 year ago #

    @Prabhat,

    According to this WordPress page on capabilities, that code should block authors from that page too. If you are talking about the other pages you need to add a few more line of code for each of the other page types or you could simply remove the 'if' block to leave the functions as"return 'manage_options';" alone, that should work.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags