Monday, December 30, 2019

WordPress Me Without Plugin Post Ke Bich Me Ads Kaise Dikhaye

WordPress Me Without Plugin Post Ke Bich Me Ads Kaise Dikhaye

Adsense is a very good advertising network and you will see Adsense ads in almost all popular blogs. If you have also approved Adsense and your blog is in wordpress, then today I am telling you about placing ads in the middle of the blog post. With which you can show ads in the blog without any plugin in your blog.
Wordpress Me Post Ke Bich me Ads Kaise Dikhaye 3 Tarike How to insert ads between posts in WordPress without plugin 3methods
Many people now make blogs so that they can earn money. Whether you know about any method or not, but you know about Adsense. That is why there is no doubt that every Blogger knows about Adsense. It is said that all its futures are very good but in a future it is very bad that it does not get approved any time soon and in order to get an account approval many people have to make a lot of papad but many people have to Easily approve.
If you do not think about AdSense in starting and will keep updating posts on your blog regularly, then when your blog starts getting good traffic, then you will apply for AdSense, then definitely your account will be approved and then people do the opposite. Know that his account gets disapprove and if after applying 5-6 times is not approved then the AdSense team also blocks him, due to which he is never able to place AdSense ads in his blog again. That is why in this you will say the most that if you keep updating new and useful posts in your blog every day, then not today but one day, your blog will be different on the whole internet.
In my case, when I created my first blog, it was in Blogger and when I wrote 150 posts, I applied for AdSense, then my account was not approved at that time. The reason for this was that my blog did not have quality content and there were not more than 300 words in a post, then I understood that it would not make my online career and after some time I launched this blog which all of you now It is going well with the prayer and I am currently using Adsense ads in my blog.
In this post, I am going to tell you about how to place plugin without WordPress ads here. You must be aware that anyone can manage WordPress Blog plugin easily, so many people install Unlimited and useless plugins for this reason, then I would like to tell such brothers that you know that useless plugin What harm can happen to your blog by installing. !! I will not be able to tell you completely yet but in short, let me tell you that the personal data of your blog can go to the owner of the plugin and your blog can be very slow. So I will request you to use the plugin only as per the requirement.
Table of Contents
It is very easy to install Ads code without a plugin, but it has some risk. Because if there is a slight mistake in coding, then the blog stops working. That is why, before this you will be asked to take backup of the blog or copy the codes of the file you are about to edit and save in your notepad. So that later there will be any problem, then you can reopen your file again by editing the file via FTP.
Here I am telling you 2 Methods. In both the methods you will need adsense ads code. That's why make ads code. If you do not know, then read the post below.

Method 1:

  1. Login to your blog and go to Dashboard -> Appearance -> Editor -> function.php.
  2. Now copy the below given code and paste it into functions.php.
add_filter ('the_content', 'qot');
function qot ($ content) {
if (! is_singular ())
return $ content;

$ paragraphAfter = 5;
$ content = explode ("", $ content);
$ new_content = '';
for ($ i = 0; $ i 
'; } $ new_content. = $ content[$i] . ""; } return $ new_content; }
  • Here ADSENSE CODE Paste your code in place of And take care not to keep the space.
  • Here .middle-ads {margin: 10px 0;}. You can change the size of margin and padding.

Method 2:

  1. Login to your blog and go to Dashboard -> Appearance -> single.php or index.php.
  2. Now by pressing CTRL + F here < ?php the_content(); ?> Search for and paste the code below.
& lt; ? php
$ content = apply_filters ('the_content', $ post- & gt; post_content);
$ content = explode ('', $ content);
$ halfway_mark = ceil (count ($ content) / 2);
$ first_half_content = implode ('', array_slice ($ content, 0, $ halfway_mark));
$ second_half_content = implode ('', array_slice ($ content, $ halfway_mark));
echo $ first_half_content .'... '; echo 'ADSENSE CODE';
      echo $ second_half_content;
? & gt;
  • ADSENSE CODE Please replace your Ads code in place of.
  • Now save changes and visit the blog.

Method 3:

  1. Login to your blog and go to Dashboard -> Appearance -> Editor -> function.php.
  2. Now copy the below code and paste it into functions.php.
function inject_ad_text_after_n_chars ($ content) {
  // only do this if post is longer than 1000 characters
  $ enable_length = 1000;
  // insert after the first after 500 characters
  $ after_character = 500;
  if (is_single () & amp; & amp; strlen ($ content) & gt; $ enable_length) {
    $ before_content = substr ($ content, 0, $ after_character);
    $ after_content = substr ($ content, $ after_character);
    $ after_content = explode ('', $ after_content);
    $ text = 'ADSENSE CODE';
    array_splice ($ after_content, 1, 0, $ text);
    $ after_content = implode ('', $ after_content);
    return $ before_content. $ after_content;
  }
  else {
    return $ content;
  }
}
add_filter ('the_content', 'inject_ad_text_after_n_chars');
  • ADSENSE CODE Please replace your Ads code in place of.
  • Now try making changes by visiting your blog.
Here I have told you about applying ads code with 3 methods. Try the method that you like. It has all methods working and I have tried it. With these methods, we can show ads in our blog without any plugin.
I hope you liked this post of mine. Tell us how you liked this post so that in the coming time we can do even more good guiding for you. If you have any question related to this post then comment. You tell your friends and relations about this post and share it in social media.