Category Banner Bug
-
Hey there,
I believe I found a bug in your source code on line 171
If reads:
if((isset($term_options[‘auto_display_banner’]) && $term_options[‘auto_display_banner’] == ‘on’) || !isset($term_options[‘auto_display_banner’]))
The problem with this, is that when auto_display_banner is unchecked it actually is set, and it’s set to the string literal “false”. I went ahead and made a super simple update to fix this by changing the conditional to:
if((isset($term_options[‘auto_display_banner’]) && $term_options[‘auto_display_banner’] == ‘on’) || $override)
And then updating the function at the very bottom to read:
//Shortcode function for displaying banner.
function wcb_show_category_banner() {
global $WCB_Category_Banner;
$WCB_Category_Banner->wcb_show_category_banner(true); //disable the only show for category tag.
}
The topic ‘Category Banner Bug’ is closed to new replies.