- This topic has 10 replies, 3 voices, and was last updated 3 years, 3 months ago by Barry.
July 22, 2018 at 6:20 am #629718Barry
I have been looking to add adsense to my website. I added the adsense code and selected the type of ads I wanted. However I noticed if I put a ‘before content’ banner add (so above the title of my blog post) then the size of my header increases and this makes my nav bar miss-aligned and sits below my logo..
Not sure why the ads are causing this since surely they are being inserted in a different div not the div for the nav bar?
I have removed the ads right now to see if there is a potential easy fix.GeneratePress 2.1.3July 22, 2018 at 9:47 am #629938LeoStaffCustomer Support
Not quite sure what you mean without seeing the problem live.
Any chance you can provide the link with the ad inserted?
You can edit the original topic and use the private URL field.
If I had to guess it’s because the ad has fixed height inline style added to it.July 22, 2018 at 12:52 pm #630076Barry
I have added in the adsense again and added a link to one of the pages with the ads on it where the problem is happening. Thank youJuly 22, 2018 at 7:41 pm #630238TomLead DeveloperLead Developer
I’m not seeing an ad before the content currently, but are you choosing the “Responsive” ad type? If not, choosing it will make the ad fit inside the container that it sites in.July 23, 2018 at 1:48 pm #631011Barry
I can see the add on my website on the page I have set to hidden on this thread. I have auto ads enabled through specific URLs and I am using Ad Inserter to insert the add before the content.July 23, 2018 at 7:25 pm #631145TomLead DeveloperLead DeveloperJuly 24, 2018 at 10:50 am #631768Barry
Not sure what you mean exactly. I haven’t moved anything. I have it set to ‘before content’ in the plugin I use called Ad Inserter.July 24, 2018 at 7:34 pm #632052TomLead DeveloperLead Developer
Can you try the “Before Content” hook inside GP Hooks instead? I’m not sure how Ad Inserter knows where before the content is.July 25, 2018 at 11:41 am #632667Barry
Sure thats me disabled ad inserter now and added my adsense code to the ‘before content’ GP hook.July 25, 2018 at 8:01 pm #632878TomLead DeveloperLead Developer
Here’s what I’m seeing: https://www.screencast.com/t/ZcmezewLA
It’s not in the “Before Content” hook that comes with GP. Are you still using a plugin to insert the ads?July 26, 2018 at 10:57 am #633418Barry
I have now deleted ad inserter (previously I disabled it) and cleared the cache. My adsense code is definitely inside the before content hook. Is that screenshot private?
- You must be logged in to reply to this topic.