WordPress.org

Support

Support » How-To and Troubleshooting » "Add New" page button in admin area

"Add New" page button in admin area

  • Hi people,
    Can someone help me with this….when you go into the admin area and click “pages” from the left handside menu, the next page comes up with title “pages” and then a button to add new page…

    is there any way i can remove this button??

    Cheers in advance.

    Brook

Viewing 10 replies - 1 through 10 (of 10 total)
  • Did you just want to remove the button, or remove permission to create pages completely?

    To remove permissions, I’d recommend installing the Members Plugin and removing the permission from the Role(s).

    Hi Mitchell,

    Thanks for your reply……i need to delete the button, its not a member site, just a standard website that the client dosnt need to include anymore pages and would so want it removed.

    Can you help, im still searching but i cant find anywhere with instructions on how to remove it…im sure its something simple and maybe somethin i missed along the way.

    Cheers again for the help….ps, the member plugin has been downloaded,thanks for that, will come in handy.

    It’s not possible to only remove the button. The only way is by removing the permission to add new pages. If you use the plugin I recommended, it can take care of that for you.

    Thanks for the help mitchell, but im determined to do this without installing a plugin….there must be a way, it’s just a button…lol

    Thanks again.

    Brook

    Hi Mitchell,

    Ok im done….ive installed this plugin now, but how do i do it so that it just removes the add new pages button…i still want the client to see and edit his pages that are already there…

    Cheers for the help.

    Brook

    Under Users > Roles > Administrator, uncheck “publish_pages”, the “add new” button will likely still appear, but they won’t be able to publish them.

    Thanks for all the help mitchell….but i DONE IT!!,,,,code below for anyone else trying this.

    // functions.php
    function hide_buttons()
    {
    global $current_screen;

    if($current_screen->id == ‘page’);
    {
    echo ‘<style>.add-new-h2{display: none;}</style>’;
    }

    // for posts the if statement would be:
    // if($current_screen->id == ‘edit-post’ && !current_user_can(‘publish_posts’))
    }
    add_action(‘admin_head’,’hide_buttons’);

    Well, that would hide the button, but if they ever access another method of publishing the page they could easily do so.

    Yeah true true….but i also removed capabilities (thanks to you)from any other user (just incase)and so as you said above it wont let them publish pages…and you were right the button does still appear..

    So its all good, but thanks again Mitchell for all your help

    Brook

    Awesome! Glad to hear it all worked out!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘"Add New" page button in admin area’ is closed to new replies.
Skip to toolbar