Skip to content

Instantly share code, notes, and snippets.

@michaelbourne
Created April 25, 2018 21:37
Show Gist options
  • Save michaelbourne/c9a59d399048f65c1d119ced8d38bb95 to your computer and use it in GitHub Desktop.
Save michaelbourne/c9a59d399048f65c1d119ced8d38bb95 to your computer and use it in GitHub Desktop.
Override the Pro Theme header assignment for specific pages and conditions
add_filter('cs_match_header_assignment', 'custom_search_header');
function custom_search_header($match) {
if (is_404()) {
$match = 1234; // the post ID for your header
}
return $match;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment