- 상태
- 개발자 대기 중
- 관련 플러그인/테마
- Flatsome
- 주제 태그
- Compatibility
문제 개요
Flatsome 테마와 WPML을 사용하는 경우, Pages 위젯을 추가하고 상위 페이지와 그 하위 페이지를 Slider로 쇼케이스하도록 설정하면 이 페이지의 번역에서는 슬라이더 요소가 올바르게 표시되지 않습니다.
임시 해결 방법
진행하기 전에 사이트를 전체 백업하세요.
- …/wp-content/themes/flatsome/inc/shortcodes/ux_pages.php 파일을 여세요.
ux_pages()함수 내부 70번째 줄 근처에서 다음 스니펫을 교체하세요:if($parent) { if(!is_numeric($parent)){ $id = get_page_by_path( $parent ); $parent = $id->ID; } $post_id = $parent; }- 다음으로 교체:
if($parent) { // WPML Workaround for compsupp-7028 if ( class_exists('Sitepress') && is_numeric($parent)) { $post_type = get_post_type($parent); $parent = apply_filters( 'wpml_object_id', $parent, $post_type , TRUE ); } if(!is_numeric($parent)){ $id = get_page_by_path( $parent ); $parent = $id->ID; } $post_id = $parent; }