Shoptimizer主题速度优化,需要安装如下插件:

Autoptimize
Breeze
Jetpack (just the CDN modules)
Flying Scripts
Asset CleanUp
Code Snippets

1.安装Autoptimize

https://wordpress.org/plugins/autoptimize

按照下述图片设置

在Images中设置Lazy-Load的图片,可以把Logo的图片放到这里,或者不设置也可以。

设置Extra

The Preload specific requests should be the full URL of your logo path

2. 安装Breeze

https://wordpress.org/plugins/breeze

安装后,默认配置即可,如下:

3.安装Jetpack启用CDN

Jetpack->Settings->Performance

在设置界面的最下方,有一个“Module”的链接,点击它。如果不需要其余功能,那么其余的全部关闭,只保留Asset CDN和Image CDN。如下:

4.安装Flying Scripts

插入如下JS

如下:

5.安装Asset CleanUp

https://wordpress.org/plugins/wp-asset-clean-up

如果Home Page并不是古腾堡创建的,那么可以Disable这三个:jetpack.css. wc-blocks-style wc-blocks-vendors-style

6.启用Typography 2.0

安装Code Snippets

https://wordpress.org/plugins/code-snippets/

加入这行代码

add_filter( 'shoptimizer_typography2_enabled', '__return_true' );

安装完成后,可以看到这个设置Appearance > Customize > Typography 2.0