Have you found it difficult to control the placement of Adsense ads on your site? Would you like to be able to turn one or more Adsense ads on or off for a specific page/post?

Following is a method that can provide more flexibility and control over where Adsense ads are placed on your website.


Defining Custom Fields
So what is a custom field? According to WordPress (http://www.wpbeginner.com/wp-tutorials/wordpress-custom-fields-101-tips-tricks-and-hacks/):

Custom Fields are a form of meta-data that allows you to store arbitrary information with each WordPress post. While this does not sound so powerful, it is the single most powerful component of WordPress posts and content types (aka post types). This meta-data is handled with key/value pairs. The key is a 'name' which identifies the specific field thus it is a constant and should stay the same for all posts however you can use the same key multiple times within one post. The value is the information that will be displayed for the field when you call it in your WordPress theme thus it can change with each post.

To get more detail about custom fields, search for "custom fields wordpress" in any search engine.


Adsense Keywords and Values
There are at least six custom field keywords associated with Adsense ads. These are:

adsense
adsense-top
adsense-middle
adsense-bottom
adsense-widget
adsense-search

Values associated with these keywords include no, left, right, and center.

The "no" value, combined with any of the location related keywords, will restrict Adsense ads from being located in that area of your post or page (top, middle, bottom, or sidebar/widget).

The "adsense" keyword with a "no" value will restrict all Adsense ads from that particular post/page.



Join the Discussion
Write something…
Recent messages
LondonLeigh Premium
Many thanks Allyn.
All the best,
Brandon
Reply
islandcat7 Premium
I would like to know where do I go to get a Ad and copy a code bar on Adsense, so that I can take it to Word Press and paste it in my website. I remember this in previous training, but forgot.
Any help please.
Reply
AllynBeekman Premium
The training lesson can be found at https://my.wealthyaffiliate.com/training/online-entrepreneur-certification-making-money-level-3/getting-paid-for-ads-on-your-site. It will point you to the page to sign up.

Once you are signed up, you will click on the My Ads tab at the top to create your "ads." On the My Ads page, you'll click on the "New Ad Unit" button at the top to specify the type and size of the ad you want on your site.

For example, you may want to allow image-only ads of size 300x250 on your post or page. Or you may want a larger text/image 300x600 allowed in your sidebar. Or you may want both. You define them on this page, then Adsense place the ads on your site.

A WA friend recommended the plugin Easy Adsense, so I installed and initialized it. The plugin allowed me to specify where I would allow ads, in general, on all my posts, pages, and/or sidebar.

Then, I implemented custom fields to add additional flexibility in ad placement.
Reply
islandcat7 Premium
Thanks for your help, i got it, this is what i needed. Thanks again.
Reply
Christabelle Premium
This is new to me yet but this is training I will definitely revisit. I like the presentation!:)
Reply
AllynBeekman Premium
Thanks Christa. Hopefully, it will be useful to you at the right point in time.
Reply
islandcat7 Premium
Could you answer my question above. Adsense has lost me. THANKS.
Reply
Christabelle Premium
I am sure it will!:)
Reply
rob3 Premium
The 'Quick Adsense' plugin is another that does a good job. It gives you access to plenty of different ad scenarios and placements right from the text editor.
Reply
AllynBeekman Premium
Does it allow you to control the ads on a specific page or post as I discuss in this tutorial? That was the key to using the custom fields. I could have 3 ads on one post, 1 on another, none on a third post, etc.
Reply
rob3 Premium
Yes it does! You can insert any number and types of ads anywhere on your site, all from within the text editor. It is done by using shortcodes.

The main ad codes are stored in the Quick Adsense Settings page on the WP dashboard.

Different ads are assigned to certain Ad Names, and these appear as buttons on the editor just below the default text icons. As you position your cursor into the desired location of your text, just click the ad name and the code is inserted.

Very straight forward.
Reply
AllynBeekman Premium
Terrific! Easy Adsense gives very brief instructions about custom fields, which is how I got started using them.
Reply
IMc Premium
Interesting way to do it. What advantage does it have over using an ad manager plugin?
Reply
AllynBeekman Premium
I use Easy Adsense plugin, which allows me to specify where I want to allow ads, in general. Yet I can't change those locations for a specific page. In fact, when I changed my mind and tried to change the location after first initiating the plugin, Adsense just added an additional ad everywhere.

Custom fields allow you to control which locations can be used post by post (see the examples on the 4th page).
Reply
IMc Premium
Thanks Allyn. I know what you mean about the automatic placements not being as you'd wish on some pages.
I can see why your method had its advantages.
Thanks for the info. Something new for me ☺
Reply
Top