我正在定制帖子类型和Genesis儿童主题。我的代码是
add_action( \'init\', \'register_cpt_testimonial\' );
function register_cpt_testimonial() {
$labels = array(
\'name\' => _x( \'Testimonials\', \'testimonial\' ),
\'singular_name\' => _x( \'Testimonial\', \'testimonial\' ),
\'add_new\' => _x( \'Add New\', \'testimonial\' ),
\'add_new_item\' => _x( \'Add New Testimonial\', \'testimonial\' ),
\'edit_item\' => _x( \'Edit Testimonial\', \'testimonial\' ),
\'new_item\' => _x( \'New Testimonial\', \'testimonial\' ),
\'view_item\' => _x( \'View Testimonial\', \'testimonial\' ),
\'search_items\' => _x( \'Search Testimonials\', \'testimonial\' ),
\'not_found\' => _x( \'No testimonials found\', \'testimonial\' ),
\'not_found_in_trash\' => _x( \'No testimonials found in Trash\', \'testimonial\' ),
\'parent_item_colon\' => _x( \'Parent Testimonial:\', \'testimonial\' ),
\'menu_name\' => _x( \'Testimonials\', \'testimonial\' ),
);
$args = array(
\'labels\' => $labels,
\'hierarchical\' => true,
\'supports\' => array( \'title\', \'thumbnail\' ),
\'public\' => true,
\'show_ui\' => true,
\'show_in_menu\' => true,
\'menu_position\' => 10,
\'show_in_nav_menus\' => true,
\'publicly_queryable\' => true,
\'exclude_from_search\' => false,
\'has_archive\' => true,
\'query_var\' => true,
\'can_export\' => true,
\'rewrite\' => true,
\'capability_type\' => \'post\'
);
register_post_type( \'testimonial\', $args );
}
如果我将代码粘贴到函数中。Genesis Framework的php为我工作。但当我使用这些代码时。作为一个Genesis的孩子,什么都没发生。请帮我找出我犯的错误。