XF 2.2 Adsense sidebar on every page and bottom add has showing issues

Black Tiger

Active member
I would like to have a sidebar on almost every part of my forum.
On the bottom I would also like to have an advertisement.

So I found some nice instructions and used the "container sidebar: below" to get the add on the correct place.

However, this is only visible on the main forum overview, not in threadlist and postlist for example.

It looks like the ads are not displaying correctly on the bottom either (different code) because for the bottom I used "Container Content: Below" but like on thread list and post list I have to refresh the page a couple of times and then the needed space is created but is blank, no add is showing. While my simple made personal banner which uses the same position but as second, is showing without issues.

So in fact these are two questions.

Edit:
This is my code for the bottom:
Code:
<br /><div style="text-align:center;">
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Forumhome, na forums -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-55xxxxxxx"
     data-ad-slot="0171xxxxxx"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div><br />
 
Solution
brand new ad codes do take a while to start showing ads. google also tends to not show ads immediately on new pages (or old pages that might not have been visited in a while in my experience). check the page source code. if the ad code appears at the right place, ad would eventually appear in that slot.

Chromaniac

Well-known member
just some thoughts... you might want to test with data-full-width-responsive="true" removed and change data-ad-format to vertical. as it is going to be in sidebar. in the end, if the ad code and placement is correct, the code should work after a few hours of placement assuming it is new.
 

Black Tiger

Active member
Thank you. That's odd. Because I have 2 codes. One for vertical and one for horizontal. Since I did not get them to work very good, I want do my adsense account, specifically choose the vertical columes, clicked save and then get code and I got the code with the responsive line in it.
So I presume the auto checks the data-ad-slot number and knows which are vertical and horizontal. Or am I mistaken?

For the sidebar this ad was already working correctly. For the sidebare the only issue is that the sidebar ad is not showing on all pages as by default Xen only has a sidebar on the main page.
So I was wondering if I could do it like this or if widgets were the only way to display the add in multiple sidebars?

The bottom page add has overall showing issues except for the main forum page.

P.s. the bottom add is also showing on the new posts search, which it shouldn't.
 

Chromaniac

Well-known member
brand new ad codes do take a while to start showing ads. google also tends to not show ads immediately on new pages (or old pages that might not have been visited in a while in my experience). check the page source code. if the ad code appears at the right place, ad would eventually appear in that slot.
 
Solution

Black Tiger

Active member
Ah oke, I'm seeing it now. I know it takes a while, but since they already started working, I thought it would work everywhere but that is not the case.
The code indeed appears.
Also now the bottom code is starting to show on various pages. And I found the templates to how them to be excluded from certain pages, to prevent getting those "no valuable content" (or something like that) warnings from Google.

So bottom issue is fixed. But what about the sidebar? Do I have to use widgets there? Since Xen only shows sidebar on main page and not everywhere? Or will that appear automatically too without the need of creating a sidebar?
 

Chromaniac

Well-known member
from my understanding, sidebar on homepage is also powered by widgets. so you just need to enable more areas for the existing widgets that appear on the homepage which i believe is the Forum list: Sidebar option in Appearance > Widgets. just open the widgets listed under this heading and turn on new areas and see which one suits you.
 
Top