admin管理员组文章数量:1287858
I am creating my custom Image slider,
in register_post_type() -> i use : supports = "title,thumbnail";
i use only two thing in supports, "title,thumbnail"
But post-thumbnails default position is Under Publish tab.
Its look ugly, I want to show feature image Under title fields. Where editor show, i want to show my feature image on that position.
Kindly tell me how this possible?
$args = array(
'labels' => $labels,
'description' => __( 'Description.', 'textdomain' ),
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => true,
'query_var' => true,
'rewrite' => array( 'slug' => 'slider' ),
'capability_type' => 'post',
'has_archive' => true,
'hierarchical' => false,
'menu_position' => null,
'supports' => array( 'title','thumbnail')
);
register_post_type( 'slider', $args );
IN case of not possible:
If this not possible then tell me please: when first time we open any post_type page, wordpress show 2 columns, left side show title,editor,comments or right side showing publish/thumbnail/category, etc
Is there any option to show default one column? so all thing show in one side..
I am creating my custom Image slider,
in register_post_type() -> i use : supports = "title,thumbnail";
i use only two thing in supports, "title,thumbnail"
But post-thumbnails default position is Under Publish tab.
Its look ugly, I want to show feature image Under title fields. Where editor show, i want to show my feature image on that position.
Kindly tell me how this possible?
$args = array(
'labels' => $labels,
'description' => __( 'Description.', 'textdomain' ),
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => true,
'query_var' => true,
'rewrite' => array( 'slug' => 'slider' ),
'capability_type' => 'post',
'has_archive' => true,
'hierarchical' => false,
'menu_position' => null,
'supports' => array( 'title','thumbnail')
);
register_post_type( 'slider', $args );
IN case of not possible:
If this not possible then tell me please: when first time we open any post_type page, wordpress show 2 columns, left side show title,editor,comments or right side showing publish/thumbnail/category, etc
Is there any option to show default one column? so all thing show in one side..
Share Improve this question edited Sep 17, 2015 at 9:53 asad raza asked Sep 15, 2015 at 11:06 asad razaasad raza 1211 silver badge3 bronze badges2 Answers
Reset to default 3Super late to the party, but well...
If you want to show your featured image right under the Post title in your Admin area, use this piece of code in your functions.php :
add_action('do_meta_boxes', 'my_cpt_move_meta_box');
function my_cpt_move_meta_box(){
remove_meta_box( 'postimagediv', 'post_type', 'side' );
add_meta_box('postimagediv', __('custom name'), 'post_thumbnail_meta_box', 'post_type', 'normal', 'high');
}
Be sure to change post_type
to you rcustom post type slug. Additionally, you can add a custom name for th eimage (instead of 'Featured Image')
You can simply drag the featured image under the Title field
本文标签: custom post typesHow can i place Feature Image under title field in wpadmin
版权声明:本文标题:custom post types - How can i place Feature Image under title field in wp-admin? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741310558a2371625.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论