Tag: Custom Taxonomy

  • Custom taxonomy 不显示在 “外观”-> “菜单”里

    Custom taxonomy 不显示在 “外观”-> “菜单”里

    I have a custom taxonomy registered for custom post type. It has ‘public’, and ‘show_in_nav_menus’ arguments set to true, but it still doesn’t appear in nav-menus.php. If I set those arguments to custom post type, it works all right… what could be the problem? 我为新文章类型(custom post type)注册了一个新的分类(register_taxonomy),’show_in_nav_menus’ 都设置为 ‘true’,但是在 “外观”-> “菜单” (nav-menus.php)里没有显示出来。可是新文章类型(custom post type)显示了,这是为什么? 好吧,看下图你或许就明白了!…

  • 让Qtranslate 支持 Custom Taxonomy

    让Qtranslate 支持 Custom Taxonomy

    If you wanted to automatically detect taxonomies, and then add translation edit fields here is some code: 如果你想要自动探测 Custom Taxonomy,然后给他们加上翻译字段, 把这段代码放在主题的 function.php 里。 function qtranslate_edit_taxonomies(){ $args=array( ‘public’ => true , ‘_builtin’ => false ); $output = ‘object’; // or objects $operator = ‘and’; // ‘and’ or ‘or’ $taxonomies = get_taxonomies($args,$output,$operator); if ($taxonomies) { foreach ($taxonomies as…