- 状态
- 等待作者
- 相关插件/主题
- WP Job Manager
- 主题标签
- Compatibility
问题概述
将 WPML 与 WP Job Manager 的 Resume Manager 附加组件配合使用时,选择简历的下拉列表会显示所有语言版本的简历,而不是仅显示当前语言的简历。
临时解决方法
在继续操作之前,请确保为您的站点创建完整的站点备份。
- 打开 …/wp-content/plugins/wp-job-manager-resumes/includes/class-wp-resume-manager-apply.php 文件。
- 找到第 85 行。
- 在
get_user_resumes()方法中,将以下代码段:$args = apply_filters( 'resume_manager_get_application_form_resumes_args', [ 'post_type' => 'resume', 'post_status' => [ 'publish', 'hidden' ], 'ignore_sticky_posts' => 1, 'posts_per_page' => -1, 'orderby' => 'date', 'order' => 'desc', 'author' => get_current_user_id(), ] );
- 替换为:
// WPML Workaround for compsupp-7799 $args = apply_filters( 'resume_manager_get_application_form_resumes_args', [ 'post_type' => 'resume', 'post_status' => [ 'publish', 'hidden' ], 'ignore_sticky_posts' => 1, 'posts_per_page' => -1, 'orderby' => 'date', 'order' => 'desc', 'author' => get_current_user_id(), 'suppress_filters' => false ] );