Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/svg/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 将已翻译的分类重定向到分类文件_Php_Wordpress - Fatal编程技术网

Php 将已翻译的分类重定向到分类文件

Php 将已翻译的分类重定向到分类文件,php,wordpress,Php,Wordpress,我为我的CPT创建了一个分类法,我使用taxonomy-categories-services.php和taxonomy-categories-technology.php作为该分类法的存档。 问题是,我需要翻译到这个文件,并使用相同的存档。有办法吗 register_taxonomy( 'categories', 'partners', array( 'hierarchical' => true, 'label' => 'Categories',

我为我的CPT创建了一个分类法,我使用taxonomy-categories-services.php和taxonomy-categories-technology.php作为该分类法的存档。 问题是,我需要翻译到这个文件,并使用相同的存档。有办法吗

register_taxonomy( 'categories', 'partners', array(
       'hierarchical' => true, 
       'label' => 'Categories', 
       'singular_label' => 'Category', 
       'has_archive' => true,
       'rewrite' => array( 'slug' => 'partners','with_front' => false )
       )
   );

你在使用哪种翻译插件?我有多站点语言切换器Get\u post\u meta($post->ID,“short\u summary\u meta\u box”,true);这就是我正在使用的。因此,对于get translation,您可以将slug与“”一起使用。它将为您提供翻译字符串。