Add adsense before footer or after post body wordpress

You can add adsense before footer or after post body wordpress by adding adsense code in content-single.php. If you want to add adsense below post title refer

your wordpress may be hosted on

To add adsense code above footer or below post body , Go to Appearance –> Editor –> content-single.php, click on the content-single.php file on the right in the editor screen, to select or modify content-single.php

Your adsense code need to be added before the <footer> the tag in content-single.php. now place your adsense code below the closing div tag or above footer tag to display adsense after post body or adsense ad just before footer


Replace google_ad_client and google_ad_slot with your adsense ad details and save the content-single.php. Please note that I have added adsense below post body in my wordpress blog which has F2 theme for wordpress. The .php file that you need to modify to display adsense ads before footer may be named different if you are using a different wordpres theme.

if you have the content-single.php in your theme or wordpress directory, modify it as given below. Once you add adsense script and save the .php file, Google adsense ads will now be dsiplayed above every post footer in your wordpress blog.

ADD YOUR ADSENSE CODE as below to display your ads below post body.

No comments:

Post a Comment