显示帖子和自定义帖子类型之间共享的同一类别的不同模板[Wordpress]

问题描述

我在自定义帖子类型声明中将faq声明为categories,从而在常规帖子和名为taxonomies自定义帖子类型之间共享类别,如下所示:

function init_custom_post_type() {
  $labels = array(
    'name'                => _x('FAQ','Post Type General Name'),'singular_name'       => _x('FAQ','Post Type Singular Name'),'menu_name'           => __('FAQ')
  );
  $args = array(
    'label'               => __('FAQ'),'labels'              => $labels,'supports'            => array( 'title' ),'hierarchical'        => false,'public'              => true,'has_archive'         => false,'taxonomies'          => array('category')
  );
  register_post_type( 'faq',$args );
}
add_action( 'init','init_custom_post_type',2 );

我想根据这样的帖子类型创建2个不同的存档页面(2个不同的模板):

我该如何实现?任何帮助将不胜感激。

我知道这与Wordpress multiple template for same category with different custom post type非常相似,但是很遗憾,我无法用其答案解决问题。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)