Adsense choice
-
Can you activate the child theme now?
Add this to child-theme’sfunctions.phpfileDon’t add this to functions.php since the style sheet issue is resolved.
<?php
function my_graphene_custom_register_styles(){
if ( ! is_admin() ){
wp_register_style( 'graphene-main-stylesheet', get_template_directory_uri() . '/style.css', array(), false, 'screen' );
}
}
add_action( 'init', 'my_graphene_custom_register_styles );
function my_graphene_custom_enqueue_styles(){
if ( ! is_admin() ){
wp_enqueue_style( 'graphene-main-stylesheet' );
}
}
add_action( 'wp_enqueue_scripts', 'graphene_enqueue_styles' );Quote:It working now.Ignore my previous reply then.
Wait, what do you want to do?
Okay, add this to child-theme’s functions.php to have only 2 ads on front page
<?php
function graphene_custom_adsense_limit(){
return 2;
}
add_filter( 'graphene_adsense_ads_limit', 'graphene_custom_adsense_limit' );
?>change
return 2toreturn 1if you want to display only one ad.
- You must be logged in to reply to this topic.
