Jump to content


Photo
- - - - -

Placing adsense ads after the 1st and 4th post on the front page


Best Answer James B , 20 April 2013 - 12:20 AM

Hi there, see Simon's example of the hook near the bottom of the page on this thread - http://www.pagelines...two-posts-only/

Go to the full post


  • Please log in to reply
3 replies to this topic

#1 danielj

danielj

    Member

  • Members
  • 14 posts
  • Country: Country Flag

Posted 19 April 2013 - 11:49 PM

Website URL:

Please Login or Register to see this Hidden Content

Framework Version: 2.4

WordPress Version: 3.5.1

 

I want to show an adsense ad after the 1st and 4th post on the main page. I tried doing it in child_functions.php like this:

Please Login or Register to see this Hidden Content

But that didn't work - it still shows after *every* post. Any suggestions on how/where I can accomplish this?

 

Thanks!



#2 James B

James B

    Advocate

  • Members

  • 5126 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 20 April 2013 - 12:20 AM   Best Answer

Hi there, see Simon's example of the hook near the bottom of the page on this thread -

Please Login or Register to see this Hidden Content



#3 danielj

danielj

    Member

  • Members
  • 14 posts
  • Country: Country Flag

Posted 20 April 2013 - 12:53 AM

Thank you! I did not search as well as I had thought. That worked perfectly (with a change to the math).



#4 James B

James B

    Advocate

  • Members

  • 5126 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 20 April 2013 - 01:03 AM

No worries, glad it worked :-)