Update: August 22, 2021
–After signing up for Google Adsense, you will have to insert ads into WordPress to make money. Because Adsense provides HTML code, placing the banner on the website is relatively easy. But if you are using Adsense for the first time, you will find it a bit difficult. This article will show you how to insert ads in WordPress as easily as possible.
Table of Contents
Insert ads in WordPress automatically
Get the promo code
With automatic type when inserted, the ad will automatically be inserted in the appropriate position. You won’t need to do anything. Google will automatically set the QC for you.
Click advertisement => overview => Lấy mã
>> Copy the code and put it in a pair of tags … trong file header.php
>> If you don’t know the code, use the plugin Insert Headers and Footers by WPBeginner to insert.
Insert Scripts in Header
Next click chỉnh sửa
Next tick Quảng cáo tự động
=> Apply to website
Insert ads in WordPress by ad unit
If you don’t like the above automatic, then switch to unit ads.
Click on category Recommended
Name the ad unit at the top => Click create
Copy the code provided by Google Adsense
>> After having that code, you will install it manually or use Plugin.
Plugin Ad Inserter – Ad Manager & AdSense Ads
After installing the plugin, click Settings
=> Ad Inserter
Set up Ad Inserter
Choose which ads to show in Posts, Homepage, Category pages… All can be selected.
At Insertion choose automatic type:
Before Post: phía trước bài viết Before Content: phía trước nội dung bài viết Before Paragraph: phía trước một đoạn văn bản After Paragraph: phía sau một đoạn văn bản After Content: phía sau nội dung bài viết After Post: phía sau bài viết Before Excerpt: phía trước văn bản mô tả ngắn bài viết After Excerpt: phía sau văn bản mô tả ngắn bài viết Between Posts: giữa nội dung bài viết Before Comments: phía trước phần bình luận After Comments: phía sau phần bình luận Footer: phía trước footer bên dưới web
If in the case of using the plugin does not show ads, you should use the manual way. Insert any Widget and wait to see if it appears or not.
With the tutorial on inserting ads in WordPress above to do it, you will follow the 2 ways that I mentioned above. To add in the middle of the article, use the Ad Inserter plugin. Or add to the functions.php file I will write in another post.