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 add 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
Buffer Callback Filter

You can use the Buffer Callback Filter feature to make any changes to the html source of a page or…

Create a Post Cache by ID Using the Function Hook
Create a Post Cache by ID Using the Function Hook

This function is designed for manually creating page caches.

Clear the Cache by Calling the Function Hook
Clear the Cache by Calling the Function Hook

You can use hooks to clear cache at specific points in the execution of the code. By strategically placing cache…

Ready to get started?

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