W3 Mind Logo
Home » How To Exclude A Page From Optimization in WP Meteor Plugin

How To Exclude A Page From Optimization in WP Meteor Plugin

Are you also using WP Meteor to improve your site’s load time and your site is breaking? If yes then you need to read this article carefully till the end.

Today we are going to talk about those issues which comes after activating or configuring WP Meteor on the site.

Many times we get stuck in a situation where site is breaking due to WP Meteor but we also need this plugin as it improves the load time of the site a lot.

Sometimes it becomes impossible to come out of such a situation. It is very challenging to fix these issues. But you can get rid of them by making some changes in WP Meteor.

How To Exclude A Page From Optimization?

After installing the plugin it gives you some options under “Settings > WP Meteor” in the WordPress backend. You can read this article to know how WP Meteor works.

Here you can exclude a script from the optimization process.

But we will use wpmeteor_enabled filter as we need to exclude a page from the optimization.

You need to add the following code snippet in your theme’s functions.php file.

Example:

				
					add_filter('wpmeteor_enabled', function ($value) {
    global $post;
    if ($post && $post->ID == 123) {
        return false;
    }
    return $value;
});
				
			

Here post ID refers to the page you want to exclude from optimization so that your page doesn’t break.

About Author
W3Mind

W3Mind

W3Mind focuses on Blogging, Make Money Online, SEO, Business Blogging, Social Media, WordPress, Internet Tools, Web Design and Development.
Give it a Share
Facebook
Twitter
LinkedIn
You May Also Like
Leave a Reply

Your email address will not be published. Required fields are marked *

How to
START A
BLOG
(step by step)
Load WordPress Sites in as fast as 37ms!