-
-
Save mrwweb/5822e44ee6d0ad7a14e732dc9e42ae81 to your computer and use it in GitHub Desktop.
Some pseudo-code for a response on NTEN WordPress Online Community Forum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'wp_head', 'nten43561_html_meta' ); | |
/** | |
* place custom meta in <head> of a WordPress site. | |
* | |
* Make sure to replace the "XX" below or else you'll get an error! | |
* | |
* @see https://community.nten.org/communities/community-home/digestviewer/viewthread?GroupId=571&MID=43561&tab=digestViewer&UserKey=3f274014-ea5f-4f43-a232-e59886306781&sKey=9dd0bd09908d46de93f9 | |
*/ | |
function nten43561_html_meta() { | |
$page_id = XX; // replace XX with the ID of the page not to cache | |
if( is_page( $page_id ) ) { | |
?> | |
<!-- replace these with whatever you want --> | |
<meta http-equiv="cache-control" content="max-age=0" /> | |
<meta http-equiv="cache-control" content="no-cache" /> | |
<meta http-equiv="expires" content="0" /> | |
<!-- end of replacement area --> | |
<?php | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment