PenciDesign Supporter replied
Hi,
By default, the category ads code only display on the magazine template, if you want to display it on the category page, please go to Appearance → Theme Editor, open file functions.php, find line 2973:
if ( ! function_exists( 'penci_render_google_adsense' ) ) {
function penci_render_google_adsense( $option ) {
if( ! get_theme_mod( $option ) )
{return '';}
return '<div class="penci-google-adsense '. $option .'">'. do_shortcode( get_theme_mod( $option ) ) .'</div>';
}
}
Replace with this content:
if ( ! function_exists( 'penci_render_google_adsense' ) ) {
function penci_render_google_adsense( $option ) {
$ads_code = get_theme_mod( $option );
if ( is_category() && 'penci_archive_ad_above' == $option ) {
$cat_id = get_queried_object()->term_id;
$cat_meta = get_option( "category_$cat_id" );
$ads_code = isset( $cat_meta['mag_ads'] ) ? stripslashes( $cat_meta['mag_ads'] ) : $ads_code;
}
if ( $ads_code ) {
return '<div class="penci-google-adsense '. $option .'">'. do_shortcode( $ads_code ) .'</div>';
} else {
return false;
}
}
}
Update file then reload your site.
Regards,
PenciDesign.
