Comment on SEO AdSense WordPress Theme by Erik.
Sorry Dave, I actually meant Tags and Categories pages–I had the Super Comments pages in mind as well, but I’ve got a separate ad code for that inserted in the single-2.php file which is how you advised me to do it previously.
My fault for the confusion on that.
I’m basically trying to do something similar to what you explained to me last year on Stallion 7 in this comment thread: https://stallion-theme.co.uk/adsense-wordpress-theme/comment-page-2/#comment-17673
To clarify, I only want the in-text ad to show on Tags and Categories pages (not main page, single posts/pages, etc.). I was able to achieve this previously using a text widget and the ad code as you suggested before, combined with the show/hide function on the text widget.
And this method seems to still work for non-responsive ad code, but not for responsive code.
I tested method 2 (“second scenario” in your previous comment above), using just the text widget and code from my Adsense account. I created both a “regular” non-responsive ad unit and a responsive unit to test it.
It works just fine for a “regular” adsense unit–displays it, and I can hide/show it on any selected pages using the text widget controls.
However it does not work for me when using a responsive unit in a text widget. It does not even display the ad. This is the code I am using(with my adsense pub number removed):
code removed by WordPress…
Again this is on a clean install so I have made no changes that might affect this. I have not added any CSS classes such as the ones you suggest that might affect or hide things in the way you describe. So I am puzzled why this works for a normal non-responsive but not a responsive ad unit.
Thanks for looking into this in such detail.
Erik
More Comments by Erik
AdSense Theme Options
WordPress adding line breaks to Responsive Adsense Code
You were right Dave, thanks for this tip. I didn’t realize it would output something different than the code that is visible in Text view. I have seen WordPress change ad code before, but it was to add that …
Continue Reading Stallion AdSense Theme
AdSense Theme Options
Adsense Shortcode works, direct pasting does not
Now I’ve gotten it to work using the shortcode (a plugin called WP Adsense Insertion, you paste the code into an input box and just place a shortcode (eg, ) where you want it to appear) on the pages in …
Continue Reading Stallion AdSense Theme
AdSense Theme Options
Pasting responsive code directly into page via WP dashboard
I am just pasting the code directly into a page using my WordPress dashboard, the second scenario you describe.
I generally don’t use the Visual mode either, am doing everything in Text mode so it’s not the code being …
Continue Reading Stallion AdSense Theme
AdSense Theme Options
Displaying Adsense Responsive Code on an Individual Page
Thanks Dave for the help on this. I had one other basic question about simply placing individual responsive adsense code snippets on individual pages.
For some reason I can’t get the responsive ad code to display on single …
Continue Reading Stallion AdSense Theme
AdSense Theme Options
Adsense “Advanced” Version Responsive Ad Unit Positioning
Update: Interestingly, the problem seems to just be with the “Smart sizing” responsive ad (the code you gave as an example above). Right before you save and copy code, Adsense gives two options for responsive unit code, their “recommended” …
Continue Reading Stallion AdSense Theme
AdSense Theme Options
Responsive Adsense Unit Positioning
Hi Dave, I have hit a little hiccup in trying to position a responsive adsense unit in the floating content area.
It seems that if I set the Content Widget Area alignment to “No float” in Layout Options, the responsive …
Continue Reading Stallion AdSense Theme