如何添加awordpress插件自定义thumbnial

时间:2015-07-13 06:31:46

标签: php wordpress-plugin

我正在创建一个wordpress插件,这个插件添加了custompost但是这个帖子没有看到特色图片

    add_theme_support('post-thumbnails',array('km-lightbox','post'));
    add_action( 'init', 'create_posttype_light_box' );
    function create_posttype_light_box() {
  register_post_type( 'km-lightbox',
    array(
      'labels' => array(
        'name' => __( 'Lightboxs' ),
        'singular_name' => __( 'lightbox' )
      ),
      'public' => true,
      'supports'=> array('title', 'editor','thumbnail'  ),
      'has_archive' => true,
      'rewrite' => array('slug' => 'lightbox')
      )
  );
}

0 个答案:

没有答案