这是我的链接。http://redesign.conei-sa.com/apps_cat . 找不到。
我的代码在函数中。php。
function prefix_register_post_type()
{
register_post_type(
\'application\',
array(
\'labels\' => array(
\'name\' => __(\'Application\', \'text_domain\'),
\'singular_name\' => __(\'Application\', \'text_domain\'),
\'menu_name\' => __(\'Application\', \'text_domain\'),
\'name_admin_bar\' => __(\'Application Item\', \'text_domain\'),
\'all_items\' => __(\'All Items\', \'text_domain\'),
\'add_new\' => _x(\'Add New\', \'prefix_portfolio\', \'text_domain\'),
\'add_new_item\' => __(\'Add New Item\', \'text_domain\'),
\'edit_item\' => __(\'Edit Item\', \'text_domain\'),
\'new_item\' => __(\'New Item\', \'text_domain\'),
\'view_item\' => __(\'View Item\', \'text_domain\'),
\'search_items\' => __(\'Search Items\', \'text_domain\'),
\'not_found\' => __(\'No items found.\', \'text_domain\'),
\'not_found_in_trash\' => __(\'No items found in Trash.\', \'text_domain\'),
\'parent_item_colon\' => __(\'Parent Items:\', \'text_domain\'),
),
\'public\' => true,
\'menu_position\' => 5,
\'supports\' => array(
\'title\',
\'editor\',
\'thumbnail\',
\'excerpt\',
\'custom-fields\',
),
\'taxonomies\' => array(
\'apps_cat\',
),
\'has_archive\' => true,
\'rewrite\' => array(
\'slug\' => \'application\',
),
)
);
}
add_action(\'init\', \'prefix_register_post_type\');
function prefix_register_taxonomy()
{
register_taxonomy(
\'apps_cat\',
array(
\'application\',
),
array(
\'labels\' => array(
\'name\' => _x(\'Categories\', \'prefix_portfolio\', \'text_domain\'),
\'singular_name\' => _x(\'Category\', \'prefix_portfolio\', \'text_domain\'),
\'menu_name\' => __(\'Categories\', \'text_domain\'),
\'all_items\' => __(\'All Categories\', \'text_domain\'),
\'edit_item\' => __(\'Edit Category\', \'text_domain\'),
\'view_item\' => __(\'View Category\', \'text_domain\'),
\'update_item\' => __(\'Update Category\', \'text_domain\'),
\'add_new_item\' => __(\'Add New Category\', \'text_domain\'),
\'new_item_name\' => __(\'New Category Name\', \'text_domain\'),
\'parent_item\' => __(\'Parent Category\', \'text_domain\'),
\'parent_item_colon\' => __(\'Parent Category:\', \'text_domain\'),
\'search_items\' => __(\'Search Categories\', \'text_domain\'),
),
\'public\' => true,
\'show_admin_column\' => true,
\'hierarchical\' => true,
\'query_var\' => true,
"rewrite" => true,
\'rewrite\' => array(
\'slug\' => \'apps_cat\',
),
)
);
}
add_action(\'init\', \'prefix_register_taxonomy\', 0);
重新设计后发现该链接。conei公司。com/apps\\u cat/index,但需要重新设计。conei公司。com/apps\\u cat这不是。。
对不起,我的英语很差。