WPML
상태
개발자가 해결함
해결된 버전
Astra 4.8.4
관련 플러그인/테마
Astra
주제 태그
Compatibility

문제 개요

WPML과 함께 Astra 테마를 사용할 때 정의되지 않은 속성(menu_id)과 관련된 PHP 경고가 WPML > 언어 섹션에 표시됩니다. 이 경고는 메인 메뉴가 할당되고 WPML의 “메뉴 언어 전환기”가 활성화된 경우에 나타납니다.


Warning: Undefined property: stdClass::$menu_id in .../wp-content/themes/astra/inc/extras.php on line 513

Warning: Undefined property: stdClass::$menu_id in .../wp-content/themes/astra/inc/extras.php on line 546

임시 해결 방법

진행하기 전에 전체 사이트 백업을 완료했는지 확인하세요.


  • …/wp-content/themes/astra/inc/extras.php 파일을 여세요.

  • 513번째 줄을 찾으세요.

  • 다음을 교체하세요:
    		if ( in_array( $args->menu_id, $astra_menu_locations ) ) {

  • 다음으로 교체하세요:
    		if ( isset( $args->menu_id ) && in_array( $args->menu_id, $astra_menu_locations ) ) {

  • 같은 파일에서 546번째 줄로 이동하세요.

  • 다음을 교체하세요:
    	$is_special_menu = in_array( $args->menu_id, $special_menu_ids );

  • 다음으로 교체하세요:
    	if ( isset( $args->menu_id ) && in_array( $args->menu_id, $astra_menu_locations ) ) {

알려진 모든 문제 →