我已经创建了一个自定义分类以及术语页面的外观。
domain.com/taxonomy/term
但是对于每个分类法术语,我都包含了各种自定义字段和包含的内容。内容很大,我想把它们显示在有个别链接点击的子页面中。我想在子页面中显示它们。
例如:
domain.com/taxonomy/term/meta-data-1
domain.com/taxonomy/term/meta-data-2
我如何创建它?
我正在使用Genesis框架
发布于 2020-12-27 23:06:05
我假设你对php和Wordpress主题有一定的了解。
您可以创建/添加一个custom-subterm,然后为该custom-subterm创建一个名为taxonomy-custom-subterm.php的特定template。
在内部,您可以向custom-term显示所有相关信息/元数据。
如果您的custom-taxonomy设置为hierachical (我相信这是默认行为),那么url应该是/custom-taxonomy/custom-term/custom-subterm/。
图形化表示
domain.com/
L custom-taxonomy/
L custom-term/ (using taxonomy.php OR taxonomy-custom-term.php as template)
L custom-subterm/ (using taxonomy-custom-subterm.php as template)这是基于默认的Wordpress层次结构。
了解更多信息@ https://developer.wordpress.org/themes/basics/template-hierarchy/。
和@ https://developer.wordpress.org/files/2014/10/Screenshot-2019-01-23-00.20.04.png
https://stackoverflow.com/questions/65466415
复制相似问题