据我所知,这应该是可行的,但如果用户无法添加自定义字段,或者添加了拼写错误等,则会导致布局中断。改用自定义帖子类型或帖子格式。基本上,您可以在函数中添加自定义帖子类型。php类似:
add_action( \'init\', \'create_post_type\' );
function create_post_type() {
register_post_type( \'review\',array( //add a handle for your custom post type, should be something that explains the post type, not just generic my_post or some such
\'labels\' => array(
\'name\' => __( \'Reviews\' ), //name can be anything
\'singular_name\' => __( \'Review\' )
),
\'public\' => true,
\'has_archive\' => true,
\'rewrite\' => array(\'slug\' => \'reviews\'),
\'supports\' => array(\'title\', \'autor\', \'editor\', \'comments\', \'custom-fields\', \'revisions\')
)
);
然后,您可以通过在名称前面加上“自定义帖子”slug,为自定义帖子类型添加模板文件,例如single Reew。php或achive review。php。
以下是更多信息:http://codex.wordpress.org/Post_Formatshttp://codex.wordpress.org/Post_Types#Custom_Typeshttp://ottopress.com/2010/post-types-and-formats-and-taxonomies-oh-my/
希望这能让您朝着正确的方向开始:)