How to install Adsense in the middle of WordPress posts

How to install Adsense in the middle of WordPress posts - Installing Adsense ads in the middle of WordPress posts without a tested plugin is easy and fast. Do you have a website and are now confused about how to place ads on your site? Using WordPress CMS as your site's platform is similar to using a plugin.

However, the more plugins you use, the slower your site gets when loaded. Now, you need a simple way without compromising your site's performance. Thus, your site still has optimal performance when accessed.

The tips we're going to share will help you get a very smart idea about how to place ads on your site. You will be our guide on implementing Adsense ads or other ads in the middle of WordPress posts without using plugins. So it can increase your online revenue.

Then, you can decide which paragraphs you want to fill with the ad code and which places are most relevant. You can also insert your ad code easily, which you can do quickly without understanding Coding.

Monetizing your site with ads is one of the ways you can choose to make money online. It is a huge advantage for you as a blog manager and smart content maker with a lot of traffic and loyal users.

Making your site a money search engine must initially require a struggle. To that, not a little time, mind and even material you've already sacrificed. A lot of webmasters are struggling to make money through their websites.

Some of them are trying to optimize some size of the ad, which is very relevant because it will be able to pay high. Strategic ad placement is very important in terms of how many ads you show.

Therefore, your earnings can decrease when you place the wrong and less relevant ads. The ads you place are rarely visible to visitors and seem limited.

Again, strategic placement for ads on your site is very important. However, there are other aspects that you should also consider when optimizing your site pages. Although some formats of ads may tempt you, they should not make you forget about your content.

You can see which format fits and where you should place the ads. When you mean that your posting can be an option in some paragraphs, you should know how to place it.

For those who have not yet understood how to place ads in some paragraphs of a post, we will try to give you a guide. We will provide a review of how you can do this.

How to install Adsense ads in the middle of WordPress posts without a plugin

1. When the code or material above is downloaded, extract it from your computer. Open the extraction file, and you will find a coding in it.

2. Now, you first log in to your cPanel hosting. Then, you access the File Manager section and then the Public_html file.

3. Next, open the wp-content and then open the themes section again. Find and open the theme or template you are using. Next, on single.php, you select Edit until a new window opens.

4. Search and find the code <?php the_content(); ?>, and remember not to get the wrong code yes. Please delete the code and replace it with the following Coding.

    $content = apply_filters('the_content', $post->post_content);  //get the post content store in $content
    $save = explode("</p>", $content);  //Separate the content into <p> blocks
    $tcount=0; //this is count for number of <p> blocks
    $adon=0;  //this is a variable so you don't show ads more than once.
      foreach($save as $item) {
        echo $item;  //print the <p> block
        echo "</p>";
        if(preg_match('/<p> /',$item)==0 && $tcount>=1 && $adon==0) {
        <div class="entry-ads1">
<div class='code-block code-block' style='margin: 8px auto; text-align: center;'>
     if(preg_match('/<p> /',$item)==0 && $tcount>=4 && $adon==1) {
        <div class="entry-ads2">
<div class='code-block code-block' style='margin: 8px auto; text-align: center;'>

5. Only then can you insert your ad in the section that we have already marked. To determine the ad's appearance in the paragraph in which it is displayed, you can set it in the code section $tcount>=1.

6. Whether you want to display it in paragraph one or two, you can set yourself according to your wishes. When it's done, please save it and see the results.

You should also know that the most important aspect is the content and your page's optimization. Do not forget always to update regular posts to attract more visitors.

It won't be impossible to earn unlimited income if you still have the spirit to fight. However, ad performance with a certain placement can minimize your income. Besides responsive website design also plays an important role if you look at the advances in security technology today.

Post a Comment