Stallion WordPress Theme AdSense Setup – Updated for Stallion 7.1.1
Update for Stallion Responsive soon…
Log into your sites WordPress Dashboard after installing the “Stallion Theme” via the “Appearance” >> “Themes” page and on the left menu click:
“Stallion Theme”
This opens the main Stallion options page (labeled “Stallion Theme”). If you’ve not registered Stallion with your unique Stallion ID, please do so now, you can not save any options settings before registering.
When the Stallion theme is registered change the “AdSense Publisher ID” setting to your Google AdSense Publisher ID.
The AdSense ID listed by default is mine : pub-8325072546567078
How to Find your Google AdSense Publisher ID
You can get your AdSense Publisher ID from your Google AdSense account when you log in.
Click the circle like icon on the right side, followed by “Settings”, followed by “Account Information” and you’ll see your Publisher ID (see screenshot below).
With the Stallion theme you can use pub-######## or a ca-pub-######## number, copy this code (doesn’t matter if you keep the ca- or not) and paste it into the “AdSense Publisher ID” box.
Make sure you do not inadvertently copy a space/tab before or after your AdSense ID, it will break your AdSense ads (please check there’s no space/tab, get quite a lot of support requests for this copy/pasting mistake).
Click the “Save Settings” button and basic AdSense is setup so you receive the ad revenue. If all you plan to use is AdSense and you are happy with the default colours, placements etc… that’s all you have to do, all other AdSense settings are optional.
On the main Stallion options page you can also turn all AdSense ads on/off (on by default) and select which of the two main ad systems (AdSense or Chitika) should be considered the most important (default order is AdSense followed by Chitika).
These settings are under “Misc Ad Settings”.
The “Ad Post Number” sets which archive post that ad type should be shown on for the home page and archive pages (Categories, Tags, Search etc…). The ad network(s) set to “Post 1” will be shown within the first post of an archive page AND in the main content of Posts and Pages (top of the main content). By default AdSense is considered most important “Post 1”, the “AdSense Main Content Ad Unit” (by default a 336px x 280px Large Rectangle ad) will be shown in a high click through area of all pages.
If you set more than one ad network to “Post 1” it will look messy, you can have them both as “Post 1”, but best to choose one of the main ad networks as the important one (I always keep it as AdSense as they tend to pay best). Ad networks set to “Post 2” and above will have their “Main Content Ad Unit” only shown on archive pages.
Google AdSense Search Form Widget Setup
Stallion 6.1 added an experimental Google AdSense Search Form Widget which allows the use of a Search form that gives your visitors the option to search your site using the standard WordPress search feature or Google AdSense with your ads attached.
To integrate Google AdSense for Search as a sidebar widget create an “AdSense for Search” ad at your AdSense Control Panel and copy the RANDOMCHARACHTERS from the code that looks like this
<input type="hidden" name="cx" value="partner-pub-8325072546567078:RANDOMCHARACHTERS" />
On the Stallion AdSense Options page paste the RANDOMCHARACHTERS in the “AdSense For Search Integration” setting box.
Go to your Widgets menu and add the “9GAT Google AdSense Search”.
If you skip the RANDOMCHARACHTERS it will use my default settings (you will not recieve the ad revenue).
Optional AdSense Settings
For optional AdSense settings click the “AdSense Options” link on the left menu under the “Stallion Theme” menu. I realise these settings may appear a little daunting at first, but they are mostly self explanatory and very easy to use. On all Stallion options pages there’s a “Restore Default Settings” button at the bottom, if you make a mess or get lost with the settings, restore them to defaults (I do it all the time :-)).
At the top of the “AdSense Options” page there’s settings for AdSense ad colours, use the link to the “WebSafe Colour Codes” to select colours.
Below this is a section for each of the AdSense ad units, the first three are content ad units, the last three are link ad units.
The “Main Content Ad Unit”, the settings are self explanatory as are the settings for the three link ad units.
The “Movable Content Ad Unit” is the fun one :-), this AdSense ad unit can be placed in 4 locations, some of which allow for a large 728px x 90px Leaderboard ad. Try them out with various ad sizes to see what works for your site.
The “Sidebar Content Ad Unit” is by default shown on the left sidebar, this can be changed by using the widgets menu : “Appearance” >> “Widgets”, drag and drop the “Stallion AdSense Content S1 Widget” to whichever sidebar you want it on – this is a multi-widget, can be added more than once, but remember you are only allowed 3 content ad units, add 4 or more and the ones loaded last code wise (normally the ad units on sidebars) will be blank spaces. If you wanted 3 sidebar ad units by adding this widget three times you must disable the other content ad units.
There’s a legacy copy of the “Stallion AdSense Content S1 Widget” called “XXStallion AdSense Content S1 Widget”, this is using old depreciated code and lacks multi-widget features like the “Widget Display Plugin” (feature turned on under “Stallion >> Layout Options” enable the “Widget Display Plugin”) doesn’t work with the old code. “XXStallion AdSense Content S1 Widget” uses the same AdSense settings, but lacks a heading that can be changed and has no multi-wdiget capabilities.
There are two additional settings for this ad unit related to it being on a sidebar, you can have this ad show or not show a heading “Advert” and show or not show a background that matches the colours of the theme (I tend to have no heading and no background colour set, looks better IMO).
Please take into account some ad unit sizes will not work in some locations, for example the 728px x 90px Leaderboard ad won’t fit if you select it for the “Main Content Ad Unit”.
AdSense Custom Ad Channels
To add a custom ad channel log into Google AdSense go to “AdSense Setup” >> “Channels”
If you already have Google AdSense channels copy the ID number from the “AdSense Setup” >> “Channels” page and paste it into the appropriate box on the admin page.
How to Hide AdSense ads on a Post by Post Basis
As of Stallion 7.1 there’s a new option on the Post and Page edit screens that turns main content AdSense ads for that blog post/static page on/off. This has no impact on sidebar AdSense ads, to disable sidebar AdSense ads under “Stallion >> Layout Options” enable the “Widget Display Plugin”, this adds new features to all multi-widgets (widgets that can be added more than once) including disabling widgets on specific posts/pages. There’s one multi-widget AdSense Content widget and one multi-widget AdSense links widget. If you are using the older AdSense widgets (labeled XX since Stallion 7.1) replace them with the new multi-widget version and use the new settings to disable on specific posts and pages.
Alternative Way to Hide AdSense Ads – Still Works
As of Stallion 6.1 the AdSense ads have a CSS class you can use to hide the ads. The ads are still loaded on the page, but your visitors won’t see them.
For posts and pages you wish to hide AdSense ads on do the following.
Edit the post or page, at the bottom of the edit form (where you add the main content) add one of the following. It’s best to add the code at the very bottom so it’s less likely to be loaded on archive pages, if a page is short of content the code might be used as part of the excerpt.
To hide all AdSense ads add:
<style>.stallionhideads, .stallionhidewads {display:none !important;}</style>
To hide the AdSense ads within the main content only (sidebar, header and footer ads will still be visible) add:
<style>.stallionhideads {display:none !important;}</style>
To hide the AdSense ads within the sidebar, header and footer areas (main content ads will still be visible) add:
<style>.stallionhidewads {display:none !important;}</style>
Do not use this code on posts where you have selected a Post Format (on the right menu of your edit screen: Aside, Audio, Chat etc…) where the format results in the entire content to be shown on archive pages. This would include the formats Aside, Audio, Chat, Image, Link, Quote, Status and Video. Standard and Gallery are safe. Using this code on one of the post formats above will load the code on archive pages like the home page and your ads will be hidden on the home page and other archives the post is loaded on.
Note: this code will hide AdSense, Chitika and Clickbank ads (works for them all).
Adsense Not showing up in Stallion Child theme
Hello,
I have turned on the AD OPTIONS, and entered my pub-ID for Google adsense. I have pasted the Google Adsense code in the boxes where they belong. I even waited over 48 hours ad my ads still do not show up.
I created a child theme and even switched to the primary theme and it still does not show. I have read the help tutorials here is there any other options that I am overlooking. Thank you.
Adsense Not showing up in Stallion Child theme
AdSense Troubleshooting
Assuming you are running either Stallion Responsive or Stallion WordPress SEO.
Most times AdSense doesn’t work it’s because the user has inadvertently copy pasted additional characters (tabs or spaces) which breaks the code.
Check before and after for spaces, should only be:
Assuming you’ve ticked “AdSense ON”.
Next thing is check the domain isn’t banned, search Google for AdSense Banned and use the sites chat check if your domain is banned.
Still not working, what’s the URL?
BTW when it works it’s instant, so no need to wait unless your AdSense account is new and not approved yet. Apparently if you haven’t verified your AdSense account the ads won’t work.
David
AdSense Troubleshooting
AdSense Malware Error?
Hi David,
I’ve been using your theme since it’s Talian days. I’ve used various malware searches of my firefox browser to discount it first.
My Stallion adsense ads seem to be showing ‘fix your pc’ and ‘upgrade’ type ads and I think my theme may be compromised as these ads are not relevant to my site. I always update wordpress itself. I’ve also used the anti malware plugin by gotmls to scan my website but it didn’t find any problems.
I’m guessing that with the release of Stallion Responsive old Stallion is not really supported any more. I’m thinking it’s time to happily pay for an upgrade to your theme as I’ve had so many free updates over the years but first do you see the problem I’m describing? I don’t want to load your new theme into a compromised wordpress and not sure what to do next.
AdSense Malware Error?
How to Remove Malware Ads
Had a look at the home page code and the code of a WordPress post and don’t see anything obvious untoward.
I see the correct AdSense ads when viewing your site, I saw some ads about roofing and others about SEO (been researching SEO, so would expect them). If you are seeing something other than AdSense ads where the AdSense ads are suggests the device you are connecting to the website with is compromised. Your PC might have been hacked or you’ve installed some ad malware that replaces AdSense ads with their ads when YOU visit websites running AdSense (so not your site hacked, your PC).
This site has AdSense ads running, do you see the same sort of ads where the AdSense ads should be? If so confirms it’s your PC.
If you don’t already run antivirus software I use Avast which is pretty good http://www.avast.com/
For checking for malware try SpyBot Search & Destroy http://www.safer-networking.org/
Also see Malwarebytes https://www.malwarebytes.org/
That being said and after rereading your comment, what you see might be normal. Google AdSense doesn’t always show ads related to what the content is about, but what the visitor has been searching for before visiting a site running AdSense.
You’ve been searching for how to find and remove malware from the sounds of things and how to fix your PC would be the sort of ads AdSense might show YOU. Google AdSense is going to show you ads related to malware products because that’s what you’ve been looking for :-)
Regarding buying Stallion Responsive 8.1, don’t take too long price goes up on 1st September. Though I’m supporting Stallion WordPress SEO v7.1.1 users I have no plans to update it further, with how Google is taking user experience into account Stallion v7.1.1 is lacking now: funny though that it probably still is the second best WordPress SEO theme available.
David
How to Remove Malware Ads
Relevant Google AdSense Ads
Hi David,
I wasn’t aware that adsense sometimes shows ads based on my searches, I thought it just showed ads related to a sites content.
I’ve purchased, downloaded and installed Stallion Responsive but it doesn’t seem to recognize my transaction ID. Do you have to manually add it to a list to be recognized?
I clicked on the email reminder link but received no email after 10 minutes. My paypal email is the same as the one used to post this comment.
Relevant Google AdSense Ads
DED : You've Reached your Daily Relay Quota
Yep, Google changed a while ago to show users what they are searching for as ads. Can get quite irritating when doing research, shows me ads I have no interest in: not that I ever click AdSense ads on any site.
Dropped you an email with your Stallion Responsive ID. Having a Godaddy email server issue, didn’t realize Godaddy has a maximum email relay limit and the new Stallion Responsive mailing list: https://stallion-theme.co.uk:10000/virtualmin-mailman/unauthenticated/listinfo.cgi/stallion
Used up the entire relay quota in one mailing today! Not sure if everyone on the list got the message, there;s significantly more people on the list than Godaddy has it’s relay limit.
This means new email that are sent via the server are in the queue with an error:
DED : You’ve reached your daily relay quota
I’ve contacted Godaddy support: sheesh Godaddy Chat support is SLOW, took an hour in the queue despite for about half an hour it reported the estimated wait would be 3 minutes!!!
Looks like it will take a few days for them to increase the relay limit (not impressed), so have some emails stuck in the queue including several Stallion Responsive order emails with the users Stallion IDs!
Will have to wait until tomorrow to be able to send them correctly, in the meantime I’m going to have to manually reroute the important ones. guess I can’t use the mailing list (only used it for two emails so far) until Godaddy increases the relay limit.
David
DED : You've Reached your Daily Relay Quota
Google For Search Widget
After the update to v8.2 for both Stallion Responsive and child themes, I don’t have the [9GAT Google AdSense Search widget] you speak of above.
I have created an AdSense Search Ad and entered the random characters on the Adsense options page (as you described above) but I can’t add the widget on my sidebar. The only widget I have relating to Adsense is ‘Stallion AdSense Content S1 Widget’; of which I have one on my sidebar (www.Cannabis-Seeds-Canada.ca).
Why is the 9GAT widget not in my widgets?
Thanks Dave
Google For Search Widget
Google AdSense Custom Search Widget
The Stallion Responsive 8.2 version of the Google AdSense Custom Search Widget is called “Stallion AdSense Google Search Widget”.
For performance reasons some of the Stallion widgets and default WordPress widgets are disabled. Basically if you don’t use a widget it’s a good idea to disable it, that way it can’t waste resources,
Go to “Stallion Theme” >> “Performance Options” and near the bottom under “Unregister Widgets” all the core and Stallion widgets are listed.
Untick any you want to use, tick any you don’t use.
It’s an interesting quirk of WordPress that some widgets when NOT used result in database queries, WordPress looks for options related to the widgets despite the fact they aren’t being used. I’ve added some default options for all the Stallion and core WordPress widgets (so they won’t waste database queries) when not in use, but I don’t know if they waste other resources (was by luck I noticed the database query issue). To be on the safe side if you aren’t using a widget, tick it to disable it, can’t waste resources if it’s unregistered.
So Bud Sailor and Susanne are the same person, a lot easier to determine an issue with a URL to look at.
Noticed you have a comment on your home page: “Why Web Speed Matters?” You realise that’s comment SPAM?
Search Google for bits of the comment like:
3) It cannot detect the technology, For instance WordPress,Drupal, Magento, Joomla, Nuke.
It’s on lots of sites as a comment, clearly spam.
You should delete comment SPAM.
David
Google AdSense Custom Search Widget
Adsense Ads Not Displaying
Hopefully last question – can you figure out why my ads are not displaying? I created 3 new responsive ad units and pasted the code respectively into the appropriate box on the Adsense Options page as follows:
The only thing that changed between the 3 was the title and the data-ad-slot number. Then I selected “Add JS Script to Footer ON”. Is this correct – if not why please?
Thanks Dave
Adsense Ads Not Displaying
AdSense Responsive Theme Code
Code doesn’t come through in WordPress unless you add code tags, so didn’t see your code, have pasted what it should look like to replace the messed up code.
If your code looks like that, should work. Must be exactly like the AdSense code above other than your AdSense pub number and the ad slot which are unique to each ad unit in your account.
If you followed the exact instructions here: https://stallion-theme.co.uk/google-adsense-responsive-ad-unit-beta-stallion-responsive-wordpress-theme-integration/ it works.
It’s important exact instructions are followed when you use the AdSense responsive code.
David
AdSense Responsive Theme Code
AdSense Theme Options
As usual Dave you are a God send. Thanks for your timely answers. The problem has been fixed and the Adsense ads now appear on my site are are actually visible to me as well; not only when I am logged in.
I love Stallion Responsive even if I am a bit slower than most with getting the setting just right. But, like you have said on numerous occasions, once it is set it is great.
Thanks Dave
AdSense Theme Options