Created
April 25, 2018 21:37
-
-
Save michaelbourne/ee66df4f2265f2a02706cefe3c5d015d to your computer and use it in GitHub Desktop.
Override the Pro Theme header assignment for specific pages and conditions
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
add_filter('cs_match_header_assignment', 'custom_search_header'); | |
function custom_search_header($match) { | |
$user = wp_get_current_user(); | |
if (is_search()) { | |
$match = 1234; // the post ID for your header | |
} | |
elseif (is_404()) { | |
$match = 4567; // 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