• My website is https://www.slbible.com

    I’m trying to add an advertisement right the right of my logo in the header and also after the content finishes in a post.

    I’ve tried editing header.php and playing around with div’s but often this breaks my website and I have to undo it. The same thing happens when I try to edit the single post page. I’ve included some images of my problem!

    View post on imgur.com

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    If i look at your code. I can see that you put html/javascript in php. Try to close the php first, than add the <script> code after ‘endwhile; ?>’

    Let me know if it worked

    Thread Starter macoroar

    (@macoroar)

    Hi,

    This worked but the ad is appearing at the bottom of the post page after the related posts and the comments. Ideally I’d like to have it between the post content and related posts, if this is possible?

    Thanks

    Hi,

    Good to hear that it works!

    What you could do is put the javascript in a div class. then you could position him everywhere you want.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘I’m having some trouble adding adsense code’ is closed to new replies.