在functions.php文件中添加以下代码:
add_action('init', 'cptui_register_my_cpt_miniblog'); function cptui_register_my_cpt_miniblog() { register_post_type('miniblog', array( 'label' => '微博客', 'description' => '一个微博客', 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'capability_type' => 'post', 'map_meta_cap' => true, 'hierarchical' => false, 'rewrite' => array('slug' => 'miniblog', 'with_front' => true), 'query_var' => true, 'menu_icon' => 'https://www.nixonli.com/wp-content/themes/nixonli/img/weibo.png', 'supports' => array('title','editor','excerpt','trackbacks','custom-fields','comments','revisions','thumbnail','author','page-attributes','post-formats'), 'taxonomies' => array('post_tag'), 'labels' => array ( 'name' => '微博客', 'singular_name' => '微博客', 'menu_name' => '微博客', 'add_new' => '添加', 'add_new_item' => '添加微博客', 'edit' => '编辑', 'edit_item' => '编辑微博客', 'new_item' => '新微博客', 'view' => '查看', 'view_item' => '查看微博客', 'search_items' => '搜索微博客', 'not_found' => '未找到', 'not_found_in_trash' => '在回收站中没有找到', 'parent' => '父级', ) ) ); }

关注公众号『窗外天空』
获取更多建站运营运维新知!互联网创业、前沿技术......
最新评论
感谢分享,谢谢站长!!@天天下载
求同型号
能别用城通吗,缺钱缺这样啊
你好,请问有华硕ac68U可以使用的版本吗
xiaomi mini 是什么架构阿 是mipsel_24kc架构ma