Change position of featured image box in Wordpress


/ Published in: PHP
Save to your folder(s)

Add this to your Wordpress theme's functions.php file. It allows you to move the 'featured image' upload/select box from the admin sidebar to another position on the page, to give it more prominence.


Copy this code and paste it in your HTML
  1. add_action('do_meta_boxes', 'customposttype_image_box');
  2.  
  3. function customposttype_image_box() {
  4.  
  5. remove_meta_box( 'postimagediv', 'customposttype', 'side' );
  6.  
  7. add_meta_box('postimagediv', __('Custom Image'), 'post_thumbnail_meta_box', 'customposttype', 'normal', 'high');
  8.  
  9. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.