简体   繁体   中英

How to remove publish button from the post in WordPress

I want to remove the publish post button in WordPress posts. I want to use neither CSS nor JS. I just want to know if there is an answer to remove it from a hook. This is the button I want to remove (also when it is Publish Post too. I don't want to see any button at all):

在此处输入图片说明

Thanks for the advice.

I've had a look and I cant find a hook that would conditionally allow you render or skip the submit button.

The code for this button can be found at wp-admin -> includes -> meta-boxes.php line 365.

It seems from your comments that you need a user role that can only save drafts ( not publish posts, send them for review etc).

Take a look at WordPress Roles and Capabilities .

Contributor ( slug: 'contributor' ) – somebody who can write and manage their own posts but cannot publish them .

(emphasis mine)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM