I want to assign a page header to all posts within a specific category.
I can set which header to display on the archive page using Categories > Cat. Name > Edit > Set Header but I can’t see a GUI way to globally set a specific header to display above any single post assigned to a specific category.
I’ve looked through the plugin code but can’t see a function that tells the theme which header to display and when to display it.
Is there a shortcode I can use or function I can call to display a header within a specific page or post?
I’m looking to do Something similar to (or the shortcode equivalent of):
<?php
if ( ! is_archive() && function_exists('relevant-gp-function') && is_single() && in_category('') ) {
relevant-gp-function('header-ID'); // Print header with post ID
}
?>
Can it be done?