我想你误解了这个计划的目的get_template_part(). 它是locate_template(), 它本身只是include().
通过调用get_template_part( \'loop\', \'tag\' ), 您正在告诉WordPress根据以下优先级查找/包含文件:
子主题loop-tag.php父主题loop-tag.php子主题loop.php父主题loop.php
If you need to modify the markup of the loop itself, then you simply need to modify the appropriate file, according to the above priority list - e.g. loop-tag.php in your Theme or Child Theme.
您可能需要创建此文件;如果是,请复制
loop.php, 命名副本
loop-tag.php, 并根据需要进行编辑。