# Optimize theme

**. Disable Gutenberg assets:** Usually you can use gutenberg blocks on blog and post pages. So disable them in rest pages to improvement page loading.

* Open functions.php in your-site/wp-content/themes/zumma-child
* Then add this following code:

```css
function zumma_child_disable_gutenberg_wp_enqueue_scripts() {
  if( ! is_singular('post') ) {
     wp_dequeue_style('wp-block-library');
     wp_dequeue_style('wp-block-library-theme');
     wp_dequeue_style('wc-blocks-style');
  }
}
add_action('wp_enqueue_scripts', 'zumma_child_disable_gutenberg_wp_enqueue_scripts', 100);
```

**3. Disable WordPress global style:** <https://github.com/WordPress/gutenberg/issues/36834>

* Open functions.php in your-site/wp-content/themes/zumma-child
* Then add this following code:

```css
function zumma_child_remove_wp_global_styles() {
     remove_action( 'wp_enqueue_scripts', 'wp_enqueue_global_styles' );
     remove_action( 'wp_body_open', 'wp_global_styles_render_svg_filters' );
}
add_action( 'init', 'zumma_child_remove_wp_global_styles' );
```

### Config Elementor settings to get best performance

#### 1. Disable default font:&#x20;

Avoid duplicate fonts load by Elementor and Zumma

1. Go to Elementor -> Settings -> General -> Tick on Disable Default Fonts box.

![](https://3786410284-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKfjNe5wRoVGG6ssPK40C%2Fuploads%2F2M7dxZ9Dez9gi2e6pFAq%2Fdisable-default-fonts.png?alt=media\&token=fba41574-b73b-4ea6-b48f-6184f8c30f35)

2\. Edit any page with Elementor -> Site Settings (Click on Bars icon) -> Global Fonts -> System Fonts => Choose font family as ‘Default’ for all settings: Primary, Secondary, Text, Accent

![](https://3786410284-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKfjNe5wRoVGG6ssPK40C%2Fuploads%2FR988qg8WIqJG0kd9SLrc%2Fdisable-elementor-fonts.png?alt=media\&token=c540ac2b-f9a8-4969-af50-f51bdde43b48)

#### 2. Disable Font Awesome 4 Support&#x20;

New websites don’t need support old Font Awesome version. So choose ‘No’ to disable it then reduce some assets loading for your website.

![](https://3786410284-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKfjNe5wRoVGG6ssPK40C%2Fuploads%2FUyMHpuzgg36KIQi316fX%2Fdisable-font-awesome4.png?alt=media\&token=f0c8c7c9-85c5-44d4-81e9-b1d9f2f0c146)

#### 3. Enable Improved Asset Loading&#x20;

The “Improved Asset Loading” mode reduces the amount of code that is loaded on the page by default

![](https://3786410284-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKfjNe5wRoVGG6ssPK40C%2Fuploads%2Fzdht7UFm9VIl91NEd5kq%2Factive-assets-loading.png?alt=media\&token=8c234126-1031-4a51-9095-827bde76c2eb)

### How to choose best server for Zumma theme?

**1. Hosting**

We recommended use Nginx hosting.

**2. CDN service**

We high recommended use BunnyCDN service ([https://bunny.net/](https://bunny.net/?ref=9x6igr10de))

**3. Caching**

We recommended use combine these plugins:

Redis Cache: <https://wordpress.org/plugins/wp-redis/>

Nginx Helper: <https://wordpress.org/plugins/nginx-helper/>

Autoptimize: <https://wordpress.org/plugins/autoptimize/>

WP-Rocket: <https://wp-rocket.me/?ref=9ed66b6f>
