Hello. Please tell me how and where to place the Adsens advertising code, so that the ad unit is displayed in the category-headings on the site as here – https://null-24.com/category/wordpress-plugin? To advertising blocks were repeated through one. Please tell me how do I do the same? Screenshot – https://yadi.sk/i/4TNiX6oPoF_UWw
-
This topic was modified 7 years by
WebMasterhi.
-
This topic was modified 7 years by
WebMasterhi.
Hi,
So you are referring to the ads that are displayed inside the post loop? By itself the theme cannot do that, there are various code solutions in the forum you could try if you want to do something similar
– https://forum.tagdiv.com/topic/how-to-insert-ads-between-posts-on-the-main-categories-and-in-the-archives/
– https://forum.tagdiv.com/topic/in-feed-adsense/
– https://forum.tagdiv.com/topic/how-to-add-adsense-ad-after-5-10-articles-on-main-page/
– https://forum.tagdiv.com/topic/adsense-infeed/
Thanks
I could not find the appropriate information and did not understand where I need to put the advertising code to display the desired ad units as well as in the screenshot. Help please.
In order to display ads inside the post loop (I believe that is what you wanted) you will have to modify the loop.php file from the theme
– http://www.screencast.com/t/FoVvUOVY
In that example the code will output the ad inserted in the custom ad 1 ad spot of the theme panel, in category pages.
Or like in this topic where the code will output the ad from custom ad 1 only in the homepage, after 4 posts, and once per page
– https://forum.tagdiv.com/topic/problems-with-tagdiv-composer/
I all made as written, put codes in all the right places, put the code AdSense https://yadi.sk/i/G0ke3KQvwmS7og and I did not display the ad units, it turned out that’s what https://yadi.sk/i/JFtFd9Pp2rO-kw
The shortcode has changed for the ad box, it is mentioned in one of the topics from above – https://www.screencast.com/t/cu1zj7KFYZOj
[td_block_ad_box spot_id="custom_ad_1"]
Modify it accordingly and it should work properly then.
Thanks. Instead of the shortcode to put the AdSense code and how to do it?
I have already solved the previous question, thank you. Please tell me, I have fulfilled all your recommendations, but got such a result, now instead of advertising shows an empty space. What am I to do?? https://yadi.sk/i/wHCGzYVW0U1B7w
Here is the page where you should be advertising https://englishmix.ru/category/vremena
The ads are there but they are not loading, there are 400 errors
– https://www.screencast.com/t/oTUmLnJD
Maybe it takes a while before Google will server the ads. As long as your Adsense accounting is fully approved the ads should be served by Google and be visible at all times
– https://support.google.com/adsense/answer/76228?hl=en
– https://support.google.com/adsense/answer/7584263?hl=en&ref_topic=1391540
– https://support.google.com/adsense/answer/9724?hl=en
– https://support.google.com/adsense/troubleshooter/7049023?hl=en
https://englishmix.ru/category/grammatika
I work with Adsens advertising for a long time and my account has been authorized for a long time. The fact is that the ad unit works when I put its code in the Staritsa itself when editing it. And when I put the same code where you say (screenshot 2), the advertising is not shown, how is it possible? Could you tell me please, that to do?https://yadi.sk/i/ZTxiDEEo6FQ6DA, https://yadi.sk/i/WZDeD_q11TtZ-A
Try to remove the ad code from the custom ad 1 section, enter a simple text instead
– https://www.screencast.com/t/UnrEFBCLm
Check if the text appears in those locations.
If it does, then there is a problem with the ad code.
If it does not, then there is a problem with the code in the loop.
the written text is displayed but no ads are displayed. https://yadi.sk/i/-0I2HXrF987_Ug How can there be a problem with the code, if I put it on the page and it works, I wrote about it in the previous letter. https://yadi.sk/i/ZTxiDEEo6FQ6DA What am I to do?
my AdSense code is the standard adaptive ad code in the feed:
<script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
<ins class=”adsbygoogle”
style=”display:block”
data-ad-format=”fluid”
data-ad-layout-key=”-cr-1x+k+3w-5c”
data-ad-client=”ca-pub-7156402844098649″
data-ad-slot=”3510427494″></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
I send you screenshots of everything, where and how I wrote the codes as you recommended me. If we don’t solve this problem, we will discuss it until the summer, but we don’t want it, right!?
https://yadi.sk/i/G0ke3KQvwmS7og
https://yadi.sk/i/N3zJYpxd1aTvxA
https://yadi.sk/i/TfnT366EoTxXjw
I tried to put other AdSense blocks, but not one does not work
That means the problem is with the ads, adsense is not delivering them which explains the 400 errors.
I found a possible cause for this to happen
– https://www.kerstner.at/2014/09/multiple-google-adsense-ad-blocks-on-same-page-are-causing-error-400-bad-response/
From what I understand using the same ad code multiple times in a page will lead to 400 errors, same as in this case.
We have already solved the problem on our own, just tweaking the code a bit and it worked.
Tell me better how to make sure that the ad unit is displayed next to another unit and there was no empty space? https://yadi.sk/i/fQiRY5x0baxG2w
$adcounter++; if (is_category() or is_archive()) { if ($adcounter == 2 or $adcounter == 4 or $adcounter == 6) {
echo ‘AdSense code
(adsbygoogle = window.adsbygoogle || []).push({});
</script>’;
} }
How can I add Adsense ads in a category? Adsense offers native ads for feeds and it also found that mobile version of Newspaper has feeds.
So where do I put Adsense code to get Adsense ads in posts category listing?
My site is https://atma.hr/
Thanks
Hello,
If you want to have Ads through your Category pages, notice that you can do this if you will use the Could Template Library. This plugin, allows you to create your own custom template for the Category page, using the TD Composer. Check here -> https://forum.tagdiv.com/tagdiv-composer-tutorial/ -> https://forum.tagdiv.com/tagdiv-cloud-library-plugin/
Hope that help!
Thanks
