• Hello,

    My website is Stomponstep1.com. I am using the theme twenty fourteen and I have already created a child theme. I am now trying to insert adsense into the code. I already added 1 adsense add in the side bar and that was easy to do by just adding a text widget without any coding. I just easily copied the code google adsense gave me into the widget. However, I also want another add block above the post title but below primary navigation bar. I tried using some plug ins but didn’t have much luck. None of them place the add where I want it & they don’t allow me to exclude certain pages (like the home page) where I don’t want adds.

    I found this post which is trying to do something similar https://www.ads-software.com/support/topic/how-do-i-put-adsense-between-nav-bar-and-page-title?replies=10. However, in my theme the same code does not exist so I don’t know where to paste the appropriate code. I copied over the header file into the child theme but I couldn’t find the code they referenced in this post. I have tried using the “inspect” function in chrome to figure out where I need to insert the ad code, but given my very limited coding ability I didn’t have any luck.

    I also found this link https://www.ads-software.com/support/topic/php-code-outside-of-loop-exclude-adsense-on-certain-pages?replies=3 where it explains how to exclude certain pages. So I think I will be able to do that. My only problem is I don’t know where to put this exclusion code & the adsense code google supplies.

    Can anyone help me figure out where I need to paste the adsense code in either the header file or some other more appropriate file?

    Any help would be much appreciated!

    thanks

  • The topic ‘Inserting Adsense Above the Title on Twenty Fourteen’ is closed to new replies.