How to adjust location of adsense advertisement

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 anos atrás
Hello guys,

Google adsense option is working fine but
I would like to adjust location of the ad a bit.
Could you tell me how to do that?

Thanks
13 anos atrás
I found Root.Master in MasterPages folder has the markup for adsense. So I was able to do what I wanted by fiddling with the file and styles.css.

More specifically, at default google ad was located at the end of page but I wanted to put the ad in the header just below header links. So I moved following line from Root.Master

<nopCommerce:GoogleAdsense runat="server" ID="ctrlGoogleAdsense" />

to <div class="header-links-wrapper"> in Header.ascx.  And you need to add

<%@ Register TagPrefix="nopCommerce" TagName="GoogleAdsense" Src="~/Modules/GoogleAdsense.ascx" %>

in Header.ascx for GoogleAdsense to be recognized in the file.

By adjusting width of header-links-wrapper in styles.css, I was able to achieve the goal. Best part is that I could do this without compiling anything.

Hope it helps other people too.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.