GoodHeart - Charity & Nonprofit WordPress Theme
DemoSupportBuy NowBuy Now
  • Getting Started
    • Welcome to GoodHeart
    • Theme requirements
    • WordPress knowledge base
  • Support
    • My Purchase code
    • How to get support
  • Installation
    • How to install demo
    • Common Installation Issues
  • Update
    • Before Updating
    • Update Theme
    • Optimize theme
  • Build Your Site
    • WordPress configuration
    • Theme Options
    • Build with Elementor
      • Header Site Part
      • Footer Site Part
      • Single Post Site Part
      • Single Page Site Part
      • Archive Site Part
      • Search Results Site Part
      • Error 404 Site Part
      • Single Product Site Part
      • Product Archives Site Part
      • Popups
      • Maintenance mode
  • WooCommerce Features
    • Sale countdown timer
    • Color Swatches
    • WooCommerce Builder
    • Freeshipping Bar
  • Menu
    • How to create menu
    • How to create Mega menu
  • FAQs
    • Things you should know about theme updating
    • How to get Instagram Access Token
    • How To Change WooCommerce Product Image Size
    • Create Header Sticky
    • Create Header Transparency
Powered by GitBook
On this page
  • Config Elementor settings to get best performance
  • How to choose best server for GreenPeace theme?
  1. Update

Optimize theme

PreviousUpdate ThemeNextWordPress configuration

Last updated 1 year ago

. 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/goodheart-child

  • Then add this following code:

function goodheart_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', 'goodheart_child_disable_gutenberg_wp_enqueue_scripts', 100);

3. Disable WordPress global style:

  • Open functions.php in your-site/wp-content/themes/goodheart-child

  • Then add this following code:

function goodheart_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', 'goodheart_child_remove_wp_global_styles' );

Config Elementor settings to get best performance

1. Disable Font Awesome 4 Support

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

2. Enable Improved Asset Loading

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

How to choose best server for GreenPeace theme?

1. Hosting

We recommended use Nginx hosting.

2. CDN service

3. Caching

We recommended use combine these plugins:

We high recommended use BunnyCDN service ()

Redis Cache:

Nginx Helper:

Autoptimize:

WP-Rocket:

https://github.com/WordPress/gutenberg/issues/36834
https://bunny.net/
https://wordpress.org/plugins/wp-redis/
https://wordpress.org/plugins/nginx-helper/
https://wordpress.org/plugins/autoptimize/
https://wp-rocket.me/?ref=9ed66b6f