How to show adsense ads on my website's First Page ?

sanjay7

New member
Joined
Sep 15, 2016
Messages
29
Points
0
Hello friends, I want to know How to show adsense ads on my website's First Page OR Home Page?
I searched on google & Youtube for this but, I got nothing. I want to show ads on Front Page under title of my first two posts.
 

Rob Whisonant

Moderator
Joined
May 24, 2016
Messages
2,481
Points
113
Are you using Wordpress or static HTML for your site? Or are you using another CMS?
 

sanjay7

New member
Joined
Sep 15, 2016
Messages
29
Points
0
Hello sir, I am using wordpress for my website. I already have edited my content-single.php file so, ads are shown in my all posts automatically. but, I need to know which file should be edited in editor so that ads are also shown on front page or you can say Home Page.
 

Rob Whisonant

Moderator
Joined
May 24, 2016
Messages
2,481
Points
113
Rob Whisonant
This is going to depend if your theme supports this. If it has a static front page you should be able to edit the index template. If not, you may need to see if you can find a plug-in that will insert the Adsense code where you want it.
 

vishwa

Well-known member
Joined
May 12, 2014
Messages
1,137
Points
63
vishwa
There are plethora of plugins available in WordPress plugin directory to show adsense ads on your blog. If you are not comfortable with plugins than you can choose themes provided my mythemeshop where you will get inbuilt ad management and add adsense code to anywhere of your site. Hope it will help you.
 

sanjay7

New member
Joined
Sep 15, 2016
Messages
29
Points
0
sanjay7
Hello Vishwa, Thanks for your reply but I don't want to use any plugin for thet. I want to do it by coding. Plugins increase load time of My website.
 

vishwa

Well-known member
Joined
May 12, 2014
Messages
1,137
Points
63
vishwa
I already mention in my post that if you don't want to use plugins than you can simply buy premium themes which have an option to add adsense code in your blog.
 

Rob Whisonant

Moderator
Joined
May 24, 2016
Messages
2,481
Points
113
Rob Whisonant
If you are wanting to do it with just code you are going to have to study and dissect the theme you want to use index page template. Figure out where the loop is that inserts the blog posts. Setup a counter in that loop and use some if structures and insert your adsense code that way. If you are not an experienced PHP programmer this will not be easy. You could hire a programmer to modify the theme for you if needed.
 

sanjay7

New member
Joined
Sep 15, 2016
Messages
29
Points
0
Vishva & Rob sir, Thanks for your support. Now I finally have decided to use a plugin instead of coding.
I will apply my original idea in future.
 
Newer threads
Replies
3
Views
3,062
Replies
2
Views
2,068
Replies
8
Views
5,583
Latest threads
Replies
2
Views
99
Replies
1
Views
183
Replies
5
Views
395
Replies
11
Views
542
Replies
2
Views
234
Recommended threads
Similar threads

Latest postsNew threads

Referral contests

Referral link for :

Sponsors

Popular tags

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top