How To Remove Post Preview Button From WordPress Post Editor

  • by

Are you working on a site or with custom post types where you don’t need post preview button? Here’s how to remove post preview button from post editor.

You will need to add the following code snippet to your website:

function adminStyle() {
	echo '
		.editor-post-preview {
		display: none;
add_action( 'admin_head', 'adminStyle');

That’s it! If you’re using the Code Snippets plugin, it should look like this:

If you found this post useful, share it with your friends: