How to Enable Adsense Auto Ads in Genesis for Certain Pages

Genesis Framework Adsense Auto Ads

If you have updated to the Genesis 2.6 latest version, you will noticed there is a new meta box for Google Adsense Auto Ads in the Genesis Theme Settings. By entering the Adsense Publisher ID, you will activate the Auto Ads, only if you enabled it in Adsense Account. But what if you want it to exclude from certain categories, or disable it on the homepage? Here you can use this simple PHP coding to get it working.

Genesis Framework Adsense
Make sure you have the Genesis Simple Hooks plugin installed, you can download it on WordPress plugin here. Disabling Auto Ads for certain pages comes really handy by just inserting the PHP coding and the WordPress Conditional tags, enabled the Auto Ads either in Category, Tags, Pages or Single Posts.

<?php if ( is_category() || is_single() ) {?>
// Paste your Adsense Auto Ads Code here
<?php } ?>

If you are not sure where to paste the conditional tags in Genesis Framework, you can install Genesis Visual Hook Guide plugin, check the Action Hooks location and then paste it into Dashboard > Genesis > Simple Hooks.

If you want to disable Auto Ads for certain pages or single posts, use the Advanced URL settings for Auto Ads. Click on New URL Group to add the URL that you would like to disable showing ads. Then unselect any ad settings that you don’t need such as Text & display ads, In-feed ads, In-article ads or Matched content.

Above is the PHP coding to use for Category and Single Posts and disabling all Auto Ads on the homepage. You can add more conditional tags accordingly to where you want the code to execute. There is an Advanced URL Setting for Auto Ads but using the coding above are way faster. Did you have another method to disable the Auto Ads for certain pages/posts? Feel free to suggest or comment below.

Share This:

Leave a Reply

Related Posts

I have been using WP Rocket for a few months now and am quite satisfied with my WordPress site’s loading speed. I used the same


This guide will help users to create & reuse the Elementor template library on WordPress and save time creating content. Elementor is a free page


Are you having a hard time removing the category base URL prefix in WordPress but it’s not working or giving redirect issues? By removing the