मैं CPT UI
के साथ एक पोस्ट प्रकार बनाया है का उपयोग करके कस्टम पोस्ट प्रकार दिखा रहे हैं:सभी पोस्ट और एक ही श्रेणी
add_action('init', 'cptui_register_my_cpts_matratze');
function cptui_register_my_cpts_matratze() {
$labels = array(
"name" => __('Matratzen', ''),
"singular_name" => __('Matratze', ''),
);
$args = array(
"label" => __('Matratzen', ''),
"labels" => $labels,
"description" => "",
"public" => true,
"publicly_queryable" => true,
"show_ui" => true,
"show_in_rest" => false,
"rest_base" => "",
"has_archive" => true,
"show_in_menu" => true,
"exclude_from_search" => false,
"capability_type" => "post",
"map_meta_cap" => true,
"hierarchical" => false,
"rewrite" => array("slug" => "matratze", "with_front" => true),
"query_var" => true,
"supports" => array("title", "editor", "thumbnail", "excerpt", "trackbacks", "custom-fields", "comments", "revisions", "author", "page-attributes", "post-formats"),
"taxonomies" => array("category", "post_tag"),
);
register_post_type("matratze", $args);
// End of cptui_register_my_cpts_matratze()
}
हालांकि, जब मैं अपने दृश्यपटल में एक लिंक से अधिक श्रेणियों का उपयोग करना चाहते हैं, मैं कोई पोस्ट नहीं
पोस्ट पर है और श्रेणी DaMi
है:
मेरी CPT UI Post Type
को गलत तरीके से कॉन्फ़िगर किया गया है
उदाहरण के लिए, जब आप पर मैं कुछ भी नहीं वापस पाने के लिए क्लिक करें? कोई सुझाव क्या मैं गलत कर रहा हूँ?
सुनिश्चित नहीं है लेकिन $ args में 'menu_position' => 1 जोड़ें। https://codex.wordpress.org/Function_Reference/register_post_type –
@DevDanidhariya मैंने अभी अपना जवाब स्पष्ट किया है! यह बैकएंड मेनू के बारे में नहीं है, लेकिन फ्रंटेंड डिस्प्ले! वैसे भी Thx !! – mrquad
@mrquad: क्या आप अपना 'register_taxonomy' कोड भी साझा कर सकते हैं। –