• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Notes to Self

  • Aviation Weather from NOAA Plugin
    • KZZV
    • Bad Shortcode
    • Simple Metar
  • Meetings
  • Meetings Map

Mark Chouinard / December 16, 2019

Modify Headers of Specific Post

add_action( 'template_redirect', 'update_header_cache' );
function update_header_cache() {
    if( is_single( 1234) ) {
        header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
        header('Pragma: no-cache');
        header('Expires: Thu, 01 Dec 1990 16:00:00 GMT');
    }
}

Filed Under: Uncategorized

Primary Sidebar

Footer

Copyright © 2021 · machouinard · Log in