Insert AdSense ads into all blog articles (ads can be inserted at specified locations) - WordPress

888u

Last update at :2024-05-10,Edit by888u

Google AdSense

is one of the most popular ways to monetize your website. You can easily add Google AdSense to your WordPress website and start making money. So do you have the same questions about how to insert ads as I did when I first started building a website? In this article, I will use Google AdSense ads as an example.

The insertion method of advertising code, whether manually inserted into articles or pages, is possible, but one disadvantage of this method is that if you have an old website, hundreds or thousands of articles have been published. Now, if you want to insert all advertisements, it is a manual job, so manually inserting advertisement positions is only suitable for new sites and when there are not many articles or pages.

Many webmasters only prepare to place ads on their websites after publishing a lot of articles, that is, adding advertising code. In fact, it is not necessary at all. My approach is to complete the peripheral functions of the new site and publish three articles. After reading the article, I immediately applied for AdSense and it was easy to pass.

If you manually publish a new article in the background of the WordPress website, you can manually insert the advertising code to add the AdSense ads you want to place. The operation method is that you need to use HTML code to add it when writing the article. Of course, some support short codes, and you can try them out for free.

In addition to manually adding advertising code, how to insert advertising code into newly published articles? The answer is actually very simple. We must use the Ad Inserter advertising plug-in. You can do whatever you want and insert it wherever you want. You can control the entire WordPress site advertising position, so you don’t need to insert it manually. Ad code, in other words, you don’t need to worry about the ad code. Ad Inserter will automatically control the ad position for you. For details, see the Ad Inserter usage tutorial below.

If you have not installed the Ad Inserter advertising plug-in, please install it in the WordPress backend first.

Ad Inserter usage tutorial

Install Ad Inserter plug-in

If you haven't installed it yet, go directly to the background interface for installing the plug-in, search for Ad Inserter and install it.

After installation, the setting interface is as follows:

Ad position control

Advertising position can be set by clicking [Insertion] at the bottom

Before post (advertising appears at the top of the article, this depends on the topic, some topics may have problems)

Before Content (the advertisement appears at the beginning of the article content, that is, before the first paragraph)

Before paragraph (the advertisement appears before the paragraph. For specific settings, you can hover the mouse over the input box and there will be a prompt. You need to specify the paragraph number in the input box on the right. 0 means a random position, and a decimal means the position of the advertisement is controlled by a percentage. )

After paragraph (the advertisement appears after the paragraph, the position control is the same as Before paragraph)

Before image (the advertisement appears before the image. For specific settings, you can hover the mouse over the input box and there will be a prompt)

After content (the advertisement appears after the image, specific settings can be made by hovering the mouse over the input box and there will be a prompt)

After post (advertising appears at the end of the article)

Before excerpt (advertisements appear in front of article abstracts and require theme support. If the theme does not display abstract ads, they will not be displayed)

After excerpt (advertising appears after the article abstract and requires theme support)

Between posts (advertising appears between two articles and appears above the category list)

Before comments (appears before the comment position, the position specification follows the above method)

Between comments (appears between two comments)

After comments (appears after comments, the position follows the above method)

Footer (bottom of the website, usually after the copyright statement)

Before HTML element (the advertisement appears before the HTML tag, the effect is to see the advertisement at the top)

Inside HTML element (advertising appears inside the specified HTML tag and can be selected by ID and class)

After HTML element (The advertisement appears after the HTML tag, and the effect is at the bottom. The effect is similar to what Footer sees.)

The above are all ad positions.

The purpose of Posts and Static Pages settings

Posts and Static Pages settings are mainly used to control whether ads can appear on articles and pages individually. When editing or publishing a new article, the option [Ad Inserter Individual Exceptions] will appear at the bottom of the editing background, as shown in the figure below Show:

Used to control whether the article you want to publish or the article you want to edit will appear in the advertisements set by Ad Inserter. Its greatest use is if some of your articles are not allowed to run Google ads. If If you do not block ads, Google will send you a violation report saying that your website has surface-level violations.

How to add AMP ads

After installing the AMP plug-in on your website, you can also add advertising slots through Ad Inserter. Adding ads to AMP pages can also be controlled through Ad Inserter. The location of the ads follows the control method for location information introduced above. .

When adding a mobile AMP ad, you need to add the ADINSERTER AMP code before the ad code, enclosed in square brackets: [] on the left and right sides. As shown below:

How to add sidebar ads

After you install the Ad Inserter plug-in, you can add Ad Inserter advertising slots directly in the gadget, and then select the corresponding advertising slot.

Recommended site searches: domain name registration network, 100m virtual host, asp.net host, mainland China proxy server IP, Guangdong host hosting, server high defense Hong Kong, Ningbo server, Korean independent server, check IP detailed address, overseas host,

Insert AdSense ads into all blog articles (ads can be inserted at specified locations) - WordPress

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码