You must be logged in to post
Search Forums:


 






Wildcard Usage:
*    matches any number of characters
%    matches exactly one character

UserPost

11:02 pm
April 22, 2009


podman

Member

posts 33

11

Hi Ryan

i'm following this thread because i'm also having problems with adsense,  i've got location 2 working but i really want the leaderboard in location 1 which isn't working.

Can i just clarify regarding the code you gave in your last post in this thread: 

1/ if i insert this (correctly) in my index php file,  will this get my location 1 leaderboard happening for adsense?

2/ When you say….. immediately following the <div id=”content”> tag…… do you mean to paste it in immediately after it or on the next line?  (sorry if that's a dumb question!)

3/ Exactly which quotation marks are you refering to when you say…..make sure you get rid of the slanted quotation marks?

cheers

Yuri

6:30 am
April 23, 2009


Ryan

Admin

posts 1523

12

1. Yes.

2. either way, same result.  It's more readable if you paste on the next line.

3. When I wrap text in this forum in the code tag that highlights it, it converts the double quotations marks to slanted one's, which are not valid code if you're pasting into a php file. So you just need to change each one to a regular double quotation mark (shift + ') in the php code before saving. So instead of

"yes"

You'll have "yes".  See the difference?

3:09 pm
April 23, 2009


podman

Member

posts 33

13

Hi Ryan

i put in the code and it works like a charm,  got the leaderboard up now.  Your a champion!

cheers

Yuri

3:14 pm
April 23, 2009


podman

Member

posts 33

14

Hi Ryan

i spoke to soon!  I just checked and the leaderboard is up on the home page but no other page.  If i have the location 2 ad switched on, it's on every page,  but location 1 (leaderboard) is only on the home page.    Is there a way to have the leaderboard on every page?   Does it need a modification to the code?

cheers

Yuri

1:30 pm
April 24, 2009


jontait

Member

posts 4

15

podman said:

Hi Ryan

i spoke to soon!  I just checked and the leaderboard is up on the home page but no other page.  If i have the location 2 ad switched on, it's on every page,  but location 1 (leaderboard) is only on the home page.    Is there a way to have the leaderboard on every page?   Does it need a modification to the code?

cheers

Yuri


I needed to apply the same fix to page.php, and then the leaderboard adsense began appearing on my wordpress "pages" as well.  I hope Ryan or someone else who knows what they are doing can confirm if any other pages need it, such as feature.php.  I don't have any "features" on my wordpress site that I know of, so I can't test this but I do want it all working properly so I don't have to worry about it down the road.  Thanks for all your help so far Ryan!

7:19 am
April 28, 2009


Ryan

Admin

posts 1523

16

You did it correctly.  The page.php, single.php and index.php files are the 3 that need the code.  I went in and added the code to the theme, so it will now display the AdSense leaderboard on every blog page.  My original thought was that most of the organic traffic would come to the single.php file, since that's your post page and that's where you would want the ad impressions.  But I think enough people want it on every page, so that is now how the theme operates.

3:08 pm
April 28, 2009


podman

Member

posts 33

17

Hi Ryan

after fixing the code on the other 2 pages, the leaderboard is now up on every page…. thanks so much!!

Here's a suggestion for an addition / update to the flex2 theme…. in the adsense section,  each location presently just has a 'yes/no' option…. it would be great if each location had 3 options: 'no', 'yes on every page', or 'yes on home page only'

cheers

Yuri

12:54 am
May 4, 2010


shaz

New Member

posts 1

18

Hi there,

 

I'm having problems with adsense too.  I have it working great in the post pages but for the posts on the home page, it doesnt show up.  I.e. (showing on individual post pages, but not on home page within the same posts)

 

I have posted the code from the single.php into the index.php but it didnt help.

 

Also, this is weird, some of my top sidebar titles are showing as links and are linking to a page on my site, that is really weird.

10:13 am
May 30, 2010


Ryan

Admin

posts 1523

19

index.php will not show adsense in the posts because if you have it set to show at the top of the post for example, you would have too many adsense locations on the page. You are only allowed 3 per page, and if you have more posts than that set to show on your home page, it would exceed that limit.

Not sure why the top sidebar titles would be linking unless they are created by widgets that are coded to link the title. I think the only one that links by default in WP is the RSS widget.

12:28 pm
June 23, 2010


sharoni

London UK

New Member

posts 2

20

Hi guys, I'm having problems too – adsense is not showing up anywhere, although the space for the leaderboard is there.  I used the code given above but it didn't help. Any suggestions?

 

Thanks

Sharoni