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:

Leave a Reply

Your email address will not be published. Required fields are marked *