WordPress:
Fix the Publish/Update button

Code to fix the Publish/Update button when editing posts and not disappear when scrolling the window.

How to use

Copy and paste the following code into the “functions.php” file of your theme.

Code

function custom_admin_js() {
	$jQ = '$=jQuery;'.
		'$("#major-publishing-actions").css({'.
			'position:"fixed",'.
			'right:0,'.
			'bottom:$("#wpfooter").height()+15,'.
			'"z-index":2000,'.
			'"border":"solid 1px #ccc",'.
			'"border-width":"1px 0 1px 1px",'.
			'"box-shadow":"3px 3px 6px"'.
		'});';
    echo '"<script type="text/javascript">'.$jQ.'</script>"';
}
add_action('admin_footer', 'custom_admin_js');

Leave a Reply

Your e-mail address will not be published. Required fields are marked *