Wordpress 重复管理员菜单帖子页面
我有一个Wordpress网站,我使用“Posts”菜单创建产品页面,因为该网站是一个目录,没有在线购买。我现在正试图建立一个博客在同一安装。是否可以复制“帖子”菜单选项和页面功能,为“博客”创建新的管理菜单。我的目标是使博客和产品分开运行,这样当您在博客部分时,就不会访问产品帖子。是的,您需要创建一个新的帖子类型 请检查这个插件这对你帮助很大Wordpress 重复管理员菜单帖子页面,wordpress,product,blogs,posts,Wordpress,Product,Blogs,Posts,我有一个Wordpress网站,我使用“Posts”菜单创建产品页面,因为该网站是一个目录,没有在线购买。我现在正试图建立一个博客在同一安装。是否可以复制“帖子”菜单选项和页面功能,为“博客”创建新的管理菜单。我的目标是使博客和产品分开运行,这样当您在博客部分时,就不会访问产品帖子。是的,您需要创建一个新的帖子类型 请检查这个插件这对你帮助很大 谢谢。是的,您需要创建新的帖子类型 请检查这个插件这对你帮助很大 谢谢。谢谢@Dipak Dholakiya。这个插件工作得很好,尽管我决定不使用插件。
谢谢。是的,您需要创建新的帖子类型 请检查这个插件这对你帮助很大
谢谢。谢谢@Dipak Dholakiya。这个插件工作得很好,尽管我决定不使用插件。我在“wpEASYtuts”上找到了一个解决方案。我建立了一个新的自定义后类型,并使用它的产品。这在我的functions.php文件中
function product_post() {
$labels = array(
'name' => _x( 'Products', 'post type general name' ),
'singular_name' => _x( 'Product', 'post type singular name' ),
'add_new' => _x( 'Add New', 'product' ),
'add_new_item' => __( 'Add New Product' ),
'edit_item' => __( 'Edit Product' ),
'new_item' => __( 'New Product' ),
'all_items' => __( 'All Products' ),
'view_item' => __( 'View Product' ),
'search_items' => __( 'Search Products' ),
'not_found' => __( 'No product found' ),
'not_found_in_trash' => __( 'No product found in the Trash' ),
'parent_item_colon' => '',
'menu_name' => 'Products',
);
$args = array(
'labels' => $labels,
'description' => 'Holds product and product specific data',
'public' => true,
'menu_position' => 5,
'supports' => array( 'title', 'editor', 'thumbnail' ),
'has_archive' => true,
'taxonomies' => array( 'category', 'post_tag' ),
);
register_post_type( 'products', $args );
}
add_action( 'init', 'product_post' );
然后继续使用重命名为“single products.php”的“single.php”文件
希望这能帮助处于同样处境的人。感谢@Dipak Dholakiya。这个插件工作得很好,尽管我决定不使用插件。我在“wpEASYtuts”上找到了一个解决方案。我建立了一个新的自定义后类型,并使用它的产品。这在我的functions.php文件中
function product_post() {
$labels = array(
'name' => _x( 'Products', 'post type general name' ),
'singular_name' => _x( 'Product', 'post type singular name' ),
'add_new' => _x( 'Add New', 'product' ),
'add_new_item' => __( 'Add New Product' ),
'edit_item' => __( 'Edit Product' ),
'new_item' => __( 'New Product' ),
'all_items' => __( 'All Products' ),
'view_item' => __( 'View Product' ),
'search_items' => __( 'Search Products' ),
'not_found' => __( 'No product found' ),
'not_found_in_trash' => __( 'No product found in the Trash' ),
'parent_item_colon' => '',
'menu_name' => 'Products',
);
$args = array(
'labels' => $labels,
'description' => 'Holds product and product specific data',
'public' => true,
'menu_position' => 5,
'supports' => array( 'title', 'editor', 'thumbnail' ),
'has_archive' => true,
'taxonomies' => array( 'category', 'post_tag' ),
);
register_post_type( 'products', $args );
}
add_action( 'init', 'product_post' );
然后继续使用重命名为“single products.php”的“single.php”文件
希望这能帮助任何处于同样情况的人