Are you using Genesis WordPress themes? On Crunchify, we are using Genesis Themes since 2014. We purchased all in one package around the same time and so far there is no regret. We love it.
We are using the same Genesis theme on all of our clients. When you work with us for any of your project need then Genesis themes come by default for you without any extra charge.
WPEngine acquired Genesis Themes sometime back and we have seen great releases after that and Genesis Blocks WordPress plugin is one of them.
Genesis Blocks provides Page-building blocks for the new WordPress editor.
Here is a list of Genesis Blocks:
- Section & Layout Block
- Advanced Columns Block
- Newsletter Block
- Pricing Block
- Post Grid Block
- Container Block
- Testimonial Block
- Inline Notice Block
- Accordion Block
- Share Icons Block
- Call-To-Action Block
- Customizable Button Block
- Spacer & Divider Block
- Author Profile Block
- Drop Cap Block
In order for above blocks to run it loads bunch of scripts and css files on site.
Samples:
<link rel="stylesheet" id="genesis-blocks-style-css-css" href="https://crunchify.com/wp-content/plugins/genesis-blocks/dist/blocks.style.build.css?ver=1607057308" media="all"> <script src="https://crunchify.com/wp-content/plugins/genesis-blocks/dist/assets/js/dismiss.js?ver=1607042093" id="genesis-blocks-dismiss-js-js"></script>
Here is a content of dismiss.js
/** * Handles dismissible notices from the Notice block. */ /** * IE 11 polyfill for Nodelist.forEach. * * @see https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach */ if ( window.NodeList && ! NodeList.prototype.forEach ) { NodeList.prototype.forEach = Array.prototype.forEach; } document.addEventListener( 'DOMContentLoaded', function() { var notices = document.querySelectorAll( '.gb-block-notice.gb-dismissable[data-id]' ); notices.forEach( function( element ) { var uid = element.getAttribute( 'data-id' ); var dismissible = element.querySelector( '.gb-notice-dismiss' ); if ( ! localStorage.getItem( 'notice-' + uid ) ) { element.style.display = 'block'; } if ( dismissible ) { dismissible.addEventListener( 'click', function( event ) { event.preventDefault(); localStorage.setItem( 'notice-' + uid, '1' ); element.style.display = ''; } ); } } ); } );
This dismiss.js is required for Notice Block.
On Crunchify, we are using Notice Block
but not using Dismissible feature
. Take a look at below.
Hello… This is Genesis Block’s Notice block
… But we are not using dismissible
feature …
Just add below code to your theme’s functions.php file.
If you are not using dismissible feature then please try disabling javascript loading it on your site.
add_action( 'wp_enqueue_scripts', 'crunchify_dequeue_dismiss_js' ); function crunchify_dequeue_dismiss_js() { wp_dequeue_script( 'genesis-blocks-dismiss-js' ); }
This will loading dismiss.js
file on your site and you should be all good. You WordPress site should be loading little faster now.