How to Remove the Footer Comment

by admin

By default, WP Fastest Cache adds an HTML comment in the page footer that indicates when and for how long the cache was created.

While this comment might appear to clutter the HTML source of the page, it is actually quite useful for identifying any errors that occurred during the cache creation process.

You can easily remove the comment added to the HTML source of the page without modifying any files in WP Fastest Cache.

Method 1: Using Filter

If you need to remove the footer comment from the html source, you can use the following filter. You can the filter on your theme’s functions.php file.

add_filter( 'wpfc_remove_footer_comment', '__return_true' );

Method 2: Using wp-config.php

You can also prefer the second method. You need to add the following line after <?php which exists at the top of wp-config.php file.

define('WPFC_REMOVE_FOOTER_COMMENT', true);

Note: Please do not forget to clear all cache.

Related articles

Placeholder Image
Exclude Urls by Calling the Function Hook

It is very simple to exclude any url from the cache. You can call the following function in a theme…

Placeholder Image
Modify Minified CSS by Calling the Function Hook

You can write your own function that will modify the content of minified or combined css sources before saving.

Placeholder Image
How to Serve Cache Only via PHP

On servers using apache, the cache is served via htaccess thanks to the rewrite rule. It is the best method…

Ready to get started?

Purchase your first license and see why 1,500,000+ websites globally around the world trust us.