Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
  • #7980

    So my main goal is to implement google ads between the 2nd and 3rd post on the home page. Ive seen it done on lots of websites and if looked at a lot of tutorials too. All of the tutorials have to do with codes like <?php $count = 1; ?> in the index.php But i cant find <?php $count = 1; ?> any were. So if you could, could you please help me achieving my goal? =]

    this is one of the tutorials i have tried that didn’t help (Purchase code hidden if logged out) /


    Thanks alot dude i know this will work but which file am editing? and maybe where?


    ok i know in the index but where to i put that line of code. sorry i just cant figure it out


    You need to place the code somewhere inside the loop. I.e. replace:

    </div><!--end entry -->


    </div><!--end entry -->
    if ( $fullsized == 1 ) { my banner code here }

    and adjust the counter variable & the banner code as required.


    I get

    Parse error: syntax error, unexpected ‘<‘ in /home/content/46/8527246/html/wp-content/themes/newscast/index.php on line 169



    If you want to insert html code you need to put ?> before it and <?php after it. Otherwise the server tries to interpret it as php code and outputs errors.


    ok thanks alot ill give it a try


    Thank you so much, i finally got it to work like i wanted to. You guys are awesome. Do you have a donate button or something. All your help is definitely worth some money.

Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘Help adding widgets/ads in between post on home page’ is closed to new replies.