Adsense Options
This options group is provided so that you can insert Google Adsense ads unit after each posts or pages. If you want to put the ads somewhere else, use the Text Widgets instead in WP Admin > Appearance > Widgets. You may need to manually write the CSS codes for the ads style and placement.
Options list
- Show Adsense advertising
- Outputs the Adsense codes into the page
- Show ads on front page as well
- By default, the theme does not display the ads on the front page. Enable this option if you would like ads to be displayed on the front page as well.
- Your Adsense code
- Insert your Adsense codes into this field. You must enter the full code, which usually look something like this:
<script type="text/javascript"><!-- google_ad_client = "ca-pub-################"; /* ad unit title */ google_ad_slot = "##########"; google_ad_width = 468; google_ad_height = 60; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
Adsense ads entered using the theme's options page will only be shown a maximum of 3 ads per page. This is the limitation set by Google for non-premium publishers (which is most of us). Placing more Adsense ads codes in the page will result in a blank area being shown for those ads, and may affect your standing in Adsense. Therefore, it is better to not place any more than 3 Adsense ads per page, which is what the theme is doing.
If you are a premium Adsense publisher, and would like to alter the maximum number of ads to be shown per page, follow these steps:
- Create a child theme
- Create a
functions.php
file in your child theme. - Insert this code into your child theme's
functions.php
file:
<?php function graphene_custom_ads_limit(){ return 10; } add_filter( 'graphene_adsense_ads_limit', 'graphene_custom_ads_limit' ); ?>
-
- You can replace the number 10 in the code above with the desired number of Adsense ads per page you'd like.