Comment on SEO AdSense WordPress Theme by SEO Dave.
Updated to take into account a brain fart, see later comment.
Sounds like you are using the widget area correctly.
I’ve just tested two scenarios that worked as expected (update: I was wrong).
On this website under “Appearance” >> “Widgets” made sure I didn’t have the “Stallion AdSense S1 Widget” added to a widget area (or you could disable another AdSense ad on the main AdSense options page: can’t use more than 3 content ad units).
Drag n dropped the “Stallion AdSense S1 Widget” to the “Floating Content Area”.
Under “Stallion Theme” >> “AdSense Ad Options” : “Full AdSense Ad Unit Code : stradunit3” form box I’ve added a full AdSense Responsive ad unit, this code (got it from my AdSense account- this bit not completely true):
<!-- stradunit3 --> <ins class="adsbygoogle stradunit3" style="display:inline-block" data-ad-client="ca-pub-8325072546567078" data-ad-slot="5263552012"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script>
Update: posted the correct code, BUT I didn’t get it directly from my AdSense account, it’s a modified version of the Advanced AdSense code with the top few lines deleted, I thought it was the Smart Sizing AdSense code. Had I used the Smart Sizing code would have replicated the text widgets not loading behavior.
Won’t make any difference if you haven’t setup a responsive code like this for my tests below, the benefit of doing it this way is the above code is the best responsive AdSense ad unit code you can use.
Under “Stallion Theme” >> “Layout Options” : “Content Widget Area Alignment” tested all three options-
No Float
Float Left
Float Right
And the AdSense ad unit loaded as expected (edit: because I used an edited version of the AdSense Advanced Code, if you use smart Sizing it fails on the two floats, not sure why).
What that option does is add a CSS class to a div that holds the widget area.
The output for no Float (align content to the left, not a float).
<div id="content_widget" class="sidebar-box align-left">
The output for Float Left (float content to the left).
<div id="content_widget" class="sidebar-box floatleft">
The output for Float Right (float content to the right).
<div id="content_widget" class="sidebar-box floatright">
View source and check you see this code close to the AdSense code.
Second scenario was similar to the above, on a test site (example output, not an ad now just a text widget with some text, but I tested with AdSense ads: http://wordpress-test2.xllx-inc.com/multiple-markup-tests/ ).
Under “Appearance” >> “Widgets” made sure I didn’t have the “Stallion AdSense S1 Widget” added to a widget area (or you could disable another AdSense ad on the main AdSense options page: can’t use more than 3 content ad units).
Drag n dropped a “Text Widget” to the “Floating Content Area”.
Logged into my AdSense account and copied a Responsive AdSense ad I prepared earlier :-) Used the Smart Sizing Responsive Ad unit code:
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- stradunit1 --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-8325072546567078" data-ad-slot="2310085616" data-ad-format="auto"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script>
The above is a full responsive AdSense ad, would work on any website, Stallion Responsive includes CSS code that uses the “stradunit1” for sizing (stradunit1 is a CSS class .stradunit1 and Stallion includes that CSS class in the mobile.css file).
Pasted the AdSense code into the text widget and again tested all three “Content Widget Area Alignment” settings as before with the same result.
Update: Re-tested the above code which is the Smart Sizing code (which shouldn’t work) and on my test website it does work for the floats IF the text widget also includes some content. For my test I’d given the text widget a heading so it showed up even if the AdSense ad didn’t. I understand what’s happening now. Because the Smart Sizing code tries to fill the entire screen (actually entire element it’s in: I thought it was screen width, it’s element width- wonder if that’s new was in beta when I first tested?) if it’s say added to a floating div with no other content, AdSense reads the element (the floating div) as having no width (that’s how floats work, they have no width, the content within “creates” the width), since there’s no space for an ad, no ad is shown. The none float code is different, the div without a float fills the entire content width, so there’s space for an AdSense ad.
I discovered something new today :-) don’t use AdSense Smart Sizing ad code within a float unless the floated div has other content to set it’s width.
Also tested the Advanced Responsive AdSense ad unit code (the version with the specific CSS built in, so doesn’t have the stradunit1 CSS class). It also worked, though the sizes didn’t work because of the built in inline CSS rules.
So couldn’t find anything wrong (edit: sort of :-)).
I know you like to change your CSS files, if you’ve edited the CSS classes .floatleft and.floatright for example adding hidden CSS or something that would move the code that could explain why you see the AdSense code in the code, but not on the page for those two settings: the CSS is hiding the content. As you can see above the only difference between
No Float
Float Left
Float Right
Is three CSS classes added to a div
.align-left
.floatleft
.floatright
If you are editing one of the CSS files try one you haven’t changed to see if it works.
David
More Comments by SEO Dave
AdSense Theme Options
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 …
Continue Reading Stallion AdSense Theme
AdSense Theme Options
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 …
Continue Reading Stallion AdSense Theme
AdSense Theme Options
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 …
Continue Reading Stallion AdSense Theme
AdSense Theme Options
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 …
Continue Reading Stallion AdSense Theme
AdSense Theme Options
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:
pub-123456789
Assuming …
Continue Reading Stallion AdSense Theme
AdSense Theme Options
Adding HTML code to a WordPress Post
Have you viewed the HTML source of the AdSense output that’s not working and compared it to the original AdSense code?
This will tell you if it’s WordPress changing your HTML after saving.
Easy to do.
Add the responsive ad code that isn’t …
Continue Reading Stallion AdSense Theme
AdSense Theme Options
Adding Responsive AdSense Code to a WordPress Post
When you say adding a Responsive AdSense ad to a WordPress page do you mean editing a page template (one of the files ending .php) and manually adding the AdSense code where you want it?
Or editing a WordPress Page or …
Continue Reading Stallion AdSense Theme
AdSense Theme Options
Advanced AdSense Responsive Ad Units
I need to get more sleep apparently, managed to replicate your issue by using the Smart Sizing AdSense Responsive Ad Code.
Where ever I suggested using Smart Sizing AdSense Responsive, should be use Advanced AdSense Responsive ad units and delete the …
Continue Reading Stallion AdSense Theme
AdSense Theme Options
Responsive AdSense Advanced Code
Edited comment to take into account completely getting it wrong, I advised using Smart Sizing should be use Advanced AdSense code with Stallion!
The difference between the two AdSense Responsive Ad Unit types is as follows, the two code examples are …
Continue Reading Stallion AdSense Theme
AdSense Theme Options
AdSense Responsive adsbygoogle.js File
One possibility is you are using broken AdSense code.
The AdSense responsive code I use on this site lacks this code:
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
Which means my AdSense ads code is broken (incomplete), but because Stallion Responsive includes the adsbygoogle.js code link it …
Continue Reading Stallion AdSense Theme
AdSense Theme Options
Responsive AdSense Ad Units Placement
The main Ad ON/OFF options are designed for the built in AdSense code including what you add on the main Stallion AdSense Options page form boxes. If an ad is turned off on the main AdSense options page that ad …
Continue Reading Stallion AdSense Theme
AdSense Theme Options
AdSense Ad Unit Placement
Oh I see, you mean under “Stallion >> AdSense Options” setting “Main Content Ad Unit – Ad Unit 1” to “off” turns that AdSense ad unit off sitewide.
That’s what the setting is supposed to do.
Turn it back on and use …
Continue Reading Stallion AdSense Theme