This article of Geeabo teaches you about the 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,
- 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.
#2. Now go to Appearance and click on the Editor option.
#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.
#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 ( )
#6. Under the (return ‘…’) single inverted commas, paste the ads code.
#7. And now click on the Update File button.
#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.
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.
- Difference between Dofollow and Nofollow Links in SEO.
- Change WordPress Login URL To Enhance Admin Security.
- Jetpack Locked Site’s Login Page – Fix In 2 Minutes.
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.
Thanks for your visit and I hope you will come again.