Prevent caching an included page
-
In my header.php, I am including a PHP page that displays the current time and weather. The code is:
<?php include(‘template-parts/weather-widget’); ?>I am wanting to ensure this included content is not cached.
I have tried changing it to the following:
<esi:include src=”wp-content/themes/makeit/template-parts/weather-widget.php” cache-control=”no-cache” />However, the included file just doesn’t appear. Any ideas?
Cheers,
Kim
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Prevent caching an included page’ is closed to new replies.