尝试创建自定义主页滑块并在图像上添加“阅读更多”链接,但我无法插入额外的meta
盒子或textarea
s
function featured_image_slider() {
$labels = array(
\'name\' => _x(\'Sliders\', \'post type general name\'),
\'singular_name\' => _x(\'Slider\', \'post type singular name\'),
\'add_new\' => _x(\'Add New\', \'slider\'),
\'add_new_item\' => __(\'Add New Slider\'),
\'edit_item\' => __(\'Edit Slider\'),
\'new_item\' => __(\'New Slider\'),
\'all_items\' => __(\'All Sliders\'),
\'view_item\' => __(\'View Slider\'),
\'search_items\' => __(\'Search Sliders\'),
\'not_found\' => __(\'No sliders found\'),
\'not_found_in_trash\' => __(\'No sliders found in Trash\'),
\'parent_item_colon\' => \'\',
\'menu_name\' => __(\'Sliders\')
);
$args = array(
\'labels\' => $labels,
\'public\' => true,
\'publicly_queryable\' => true,
\'show_ui\' => true,
\'show_in_menu\' => true,
\'query_var\' => true,
\'rewrite\' => true,
\'capability_type\' => \'post\',
\'has_archive\' => true,
\'hierarchical\' => false,
\'menu_position\' => null,
\'supports\' => array( \'title\', \'editor\', \'thumbnail\', \'custom-fields\', )
);
register_post_type(\'slider\',$args);
}
add_action( \'init\', \'featured_image_slider\' );