English 中文(简体)
我如何从言辞中排除征税?
原标题:How do I remove a taxonomy from Wordpress?

I m 创造不同的习俗岗位类型和课税,我想从拖欠的员额类型中取消邮政税。 我如何这样做?

感谢。

问题回答

我建议你不要说什么是全球的。 更安全的做法是简单地从邮类中取消分类:登记——经济用途用于创建和修改。

function ev_unregister_taxonomy(){
    register_taxonomy( post_tag , array());
}
add_action( init ,  ev_unregister_taxonomy );

3. 取消旁边关门:

// Remove menu
function remove_menus(){
    remove_menu_page( edit-tags.php?taxonomy=post_tag ); // Post tags
}

add_action(  admin_menu ,  remove_menus  );

或许一种技术上更正确的方法是使用unregister_taxonomy_for_object_type

add_action(  init ,  unregister_tags  );

function unregister_tags() {
    unregister_taxonomy_for_object_type(  post_tag ,  post  );
}

未登记和删除的总数(第5.4版)

add_action( init , function(){
        global $wp_taxonomies;
        unregister_taxonomy_for_object_type(  category ,  post  );
        unregister_taxonomy_for_object_type(  post_tag ,  post  );
        if ( taxonomy_exists(  category ))
            unset( $wp_taxonomies[ category ]);
        if ( taxonomy_exists(  post_tag ))
            unset( $wp_taxonomies[ post_tag ]);
        unregister_taxonomy( category );
        unregister_taxonomy( post_tag );
    });

如果说到<条码>taxonomy_to_remove <>/code>,你就进入了你想要取消的分类。 例如,请以现有的<代码>post_tag/code>或取代。

add_action(  init ,  unregister_taxonomy );
function unregister_taxonomy(){
    global $wp_taxonomies;
    $taxonomy =  taxonomy_to_remove ;
    if ( taxonomy_exists( $taxonomy))
        unset( $wp_taxonomies[$taxonomy]);
}

新的职能是取消债务税制。

<编码>Use ungister_taxonomy (string taxonomy ) function

详细情况见

在行政中使用

function unregister_taxonomy(){
    register_taxonomy( post_tag , array());
}
add_action( admin_init ,  unregister_taxonomy );

add_action( admin_menu , remove_menu_items ); function remove_menu_items() { remove_submenu_page( edit.php , edit-tags.php?taxonomy=post_tag ); }





相关问题
Wrap stray text in <p> tags

Wordpress issue.. how do I wrap stray text in P tags? Example: Before- <div class = "content"> <img src = "hello.jpg"/> <h1>Introduction</h1> Hello! this is ...

Using jQuery Plugins with Wordpress

Having a bit of trouble using jQuery plugins (Superfish, jQuery UI, etc) using Wordpress. Everything works fine in my plain non-Wordpress site, but Wordpress seems to conflict with JQuery. There must ...

WordPress Data Storage Efficiency

I ve been asked to review a WordPress plugin of sorts and try to find ways of making it faster. The premise of this plugin is basically to store a bunch of users and shifts and appointments and ...

Why can t I properly style a blockquote in Wordpress?

On the design I just created for my website, I have a blockquote styled with two quote images using the span technique in css: blockquote { background-image: url(images/openquote.jpg); background-...

How does the WordPress <!--nextpage--> tag actually work?

What happens? I m guessing that somehow the post or page is parsed before displaying, and then just split into two methods? I can t seem to find any documentation on how the underlying <?php ...

Wordpress Plug-ins: How-to add custom URL Handles

I m trying to write a Wordpress Plug-in but can t seem to figure out how you would modify how a URL gets handled, so for example: any requests made for: <url>/?myplugin=<pageID> will ...

热门标签