首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在未找到的页面上重定向自定义纹理

问在未找到的页面上重定向自定义纹理
EN

Stack Overflow用户
提问于 2016-09-01 07:03:49
回答 1查看 404关注 0票数 0
代码语言:javascript
复制
add_action( 'init', 'products_post_product' );

function add_custom_taxonomies() {
  // Add new "Locations" taxonomy to Posts
  register_taxonomy('Categorys', 'products', array(
    // Hierarchical taxonomy (like categories)
    'hierarchical' => true,

   'show_ui'           => true,
    'show_admin_column' => true,
    'query_var'         => false,

 //   'hide_meta_box' => true, 
    // This array of options controls the labels displayed in the WordPress Admin UI
    'labels' => array(
      'name' => _x( 'categorys', 'taxonomy general name' ),
      'singular_name' => _x( 'Categorys', 'taxonomy singular name' ),
      'search_items' =>  __( 'Search Categorys' ),
      'all_items' => __( 'All Categorys' ),
      'parent_item' => __( 'Parent Categorys' ),
      'parent_item_colon' => __( 'Parent Categorys:' ),
      'edit_item' => __( 'Edit Categorys' ),
      'update_item' => __( 'Update Categorys' ),
      'add_new_item' => __( 'Add New Categorys' ),
      'new_item_name' => __( 'New Categorys Name' ),
      'menu_name' => __( 'Categorys' ),
    ),
    // Control the slugs used for this taxonomy
    'rewrite' => array(
      'slug' => 'categorys', // This controls the base slug that will display before each term
     // 'with_front' => true, // Don't display the category base before "/locations/"
     // 'hierarchical' => false // This will allow URL's like "/locations/boston/cambridge/"
    ),
  )
);

}

以上是我的代码:但我的分类法术语页是重定向到页,而不是找到页面。我的url hhtp://url.com/ .Am - 404页.Need i在代码中有任何错误,或者我必须将页面重定向到其他页面,或者我必须创建其他页面,我的分类法片段.Need帮助

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-09-01 11:07:32

以上是我的代码:但我的分类法术语页是重定向到页,而不是找到页面。我的url hhtp://url.com/ .Am - 404页.Need i在代码中有任何错误,或者我必须将页面重定向到其他页面,或者我必须创建其他页面,我的分类法片段.Need帮助

Ans :需要为您的分类法创建文件,例如分类法- create ys.php作为您的分类法名称,在分类法单词之前使用。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39264739

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档