Adsense

Smarter Way To Add Adsense Code To Your WordPress Blog

This article of Geeabo teaches you about the Smarter Way to Add Adsense Code To Your WordPress Blog.

Smarter Way To Add Adsense Code To Your WordPress Blog

Friends, Instead of copying the ads code and paste it into your WordPress blog is a quite traditional method in my opinion. :).

Here one good news for you that this method also works in almost all ads network. Such as –

  • Google Adsense,
  • Media.net,
  • Infolinks,
  • Chitika, etc.

So, today I want to discuss the easiest and the Smarter Way to Add Adsense Code to Your WordPress Blog.

Now after reading this article, you will forget about the copying the ads code and paste it into your WordPress blog again and again.

In the previous article, I have already written about the Best Adsense Alternatives. You may go through the link to read that article.

There is a lot of ways to earn money online but the Google Adsense is considered as the best way.

So, without making this article too long and confusing, Let’s get started. 🙂

Smarter Way To Add Adsense Code To Your WordPress Blog

Follow the steps very carefully to add Adsense Code to your WordPress website.

#1. Login to your WordPress Dashboard.

Dashboard

#2. Now go to Appearance and click on the Editor option.

Appearance >> Editor

#3. Here, find Theme Function or function.php page. Friends, almost all the WordPress theme has the Theme Function page regardless of the theme that you using. So, simply open it up.

Theme Function

#4. Now scroll down and go to the bottom of the function.php page and press the enter button to create some space for code.

#5. Now create a function to appear the ads on your blog.

How to create function?

function firstAdFunction ( )
{
return ”;
}
add_shortcode(‘AppearHere’, ‘firstAdFunction’);

Code

#6. Under the (return ‘…’) single inverted commas, paste the ads code.

#7. And now click on the Update File button.

Update

#8. Now remember that what you written in the last ( add_shortcode(‘AppearHere‘, ‘firstAdFunction’); ) line.

#9. Now go to All Posts, open an existing post or Add New post.

#10. And here simply write, that you have written in the first single inverted commas of the last line of shortcode that is “AppearHere” under the square brackets.

Like this [AppearHere]. And at last, click on Update.

Add Code

Now Done.

Conclusion.

Instead of paste the huge ads code in all the places, just you need to write a word in the brackets.

By doing this, your work will be halfway.

This is not a very difficult to do, even this is very easy.

For doing all this, you need to do some changes in your theme’s ‘functions.php’ file.

Then you have to create a function on theme function file. I mention everything about creating function.

And after creating it will give you a small a word like code which you have to put every place where you want ot show ads.

So, this was the process to Add Adsense Code To Your WordPress Blog.

If you have any question or suggestion regarding this article, then feel free to ask me in the comment box below.

After helping you, I feel very happy.

If you liked this article, please Like, Comment and Share On Facebook, Twitter, Google+.

Thanks for your visit and I hope you will come again.

Founder of Geeabo and Managing Editor. He began blogging in 2017.
In the Geeabo community you receive a new article everyday. Where I tell you some important things about the world of Technology, Inspirational, How to, etc.

Leave a Reply

Your email address will not be published. Required fields are marked *