- 状态
- 已由作者解决
- 相关插件/主题
- WPResidence
- 主题标签
- Compatibility
问题概述
使用 WP Residence 及其 Studio Templates 时,翻译页眉/页脚模板可能会失败:显示规则会被清除或覆盖,并且默认语言的页眉/页脚模板会显示在所有语言中。
临时解决方法
请确保在继续操作前对站点进行完整的站点备份。
- 打开 …wp-content/plugins/residence-studio/includes/class-header-footer-templates.php 文件。
- 查找
display_head_foot()函数(第 87 行附近)。 - 按如下方式将
'suppress_filters' => false添加到参数中:
public function display_head_foot() { $conditions = $this->build_conditions_for_post(); $args = array( 'post_type' => 'wpestate-studio', 'posts_per_page' => -1, 'post_status' => 'publish', 'suppress_filters' => false, );