add google adsense code in wordpress posts/blog
- By sandeshacharya
- July 21, 2014
- No Comments
Adding google adsense code’s in wordpress posts/blog is a way to optimize a good revenue from google adsense. There becomes high probability to get CPC and thus high earning. This article learns users to add google adsense in between articles of the posts as to optimize the site health and revenue optimization.
Following quick steps helps you to place the ad code systematically and without overlaying the article content.
step 1:
go to the appearance and then editor on the dashboard of wordpress
step 2:
now go to theme functions (functions.php)
step 3:
go to buttom of the theme functions
step 4:
add the following code in the theme functions
CODE:
function myAdSenseCodeFunction(){
return ‘Your AdSense Code Goes Here‘;
}
add_shortcode(‘adToAppearHere’, ‘myAdSenseCodeFunction’);
you needed to place your google ad code in place of ‘Your AdSense Code Goes Here’
click on update buttom at the end
step 5:
now go to any of the posts of your website in wordpress
step 6:
copy and add the following code in any place and order in the posts:
[adToAppearHere]
click on update/publish buttom
step 7:
the google ads now appear automatically in the posts!!!
→change your ip address →online courses →blog
Leave a Reply