Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/meteor/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何添加wordpress特定的帖子格式_Wordpress_Wordpress Theming - Fatal编程技术网

如何添加wordpress特定的帖子格式

如何添加wordpress特定的帖子格式,wordpress,wordpress-theming,Wordpress,Wordpress Theming,如何添加WordPress特定的帖子格式? 我想添加的格式是->医生 我尝试了这个代码,但这个代码不起作用 add_action('init', 'my_theme_slug_add_post_formats_to_page', 11); function my_theme_slug_add_post_formats_to_page(){ add_post_type_support( 'doctor', 'post-formats' ); register_taxonomy_for_objec

如何添加WordPress特定的帖子格式? 我想添加的格式是->医生

我尝试了这个代码,但这个代码不起作用

add_action('init', 'my_theme_slug_add_post_formats_to_page', 11); function my_theme_slug_add_post_formats_to_page(){
add_post_type_support( 'doctor', 'post-formats' );
register_taxonomy_for_object_type( 'post_format', 'doctor' );

}

您可以将帖子格式添加到自定义帖子类型“医生”中,但无法创建自己的自定义帖子格式“医生”