노트



코드 및 디자인 레퍼런스


  • 워드프레스 구텐버그 로드 비활성화
    function smartwp_remove_wp_block_library_css(){
       wp_dequeue_style( 'wp-block-library' );
       wp_dequeue_style( 'wp-block-library-theme' );
    }
    add_action( 'wp_enqueue_scripts', 'smartwp_remove_wp_block_library_css' );

    특정 목적에 따라 워드프레스의 Gutenberg 에디터가 불필요할 경우가 있다. 그럴때 보통 Classic Editor 를 설치하기도 한다. 하지만 프론트엔드에서는 여전히 Gutenberg 관련 스크립트가 로드 되는것을 볼 수 있다. 확실히 Gutenberg를 비활성화하여 사이트 로드를 조금 더 빠르게 하고자할때 사용하면 좋다.

    8월 6, 2021