Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adding Adsense code snippet
#2
Well bloody hell - I've worked it out!!
As I didn't see the solution anywhere let me share how I did it.

For reference, the site I've done this on is The Best of British.
The ads in question are the ones on the CHAPTERS pages, every few inches down the page amongst the paragraphs of text (the footer ads are not what I am addressing here).

First you need to create a COMPONENT and insert your AdSense code into. You do this under THEME (top menu) then EDIT COMPONENTS (right hand menu), then ADD COMPONENT.
I named mine "advert" as you see here and just copied/pasted the AdSense code in:

[Image: 1.PNG]

Second, you need to go to the PAGE you wish to insert the ad into. Click on SOURCE then insert:
{% name %} wherever you want the ad to appear.
Replace "name" with the name you called your component. In my case it's "advert" as you can see below.
The <p> tags I did not enter - they were added automatically.

[Image: 2.PNG]

To see the result just look at the page and scroll down and you will see ads at intervals.

Interestingly if you VIEW SOURCE of the page you will that the little code above actually pulls the whole AdSense snippet / script into the resulting html that makes up the page. Quite clever really.
Reply


Messages In This Thread
Adding Adsense code snippet - by effingpot - 2018-01-26, 21:24:35
RE: Adding Adsense code snippet - by effingpot - 2018-01-26, 22:08:43
RE: Adding Adsense code snippet - by datiswous - 2018-01-27, 05:06:59
RE: Adding Adsense code snippet - by effingpot - 2018-01-27, 05:23:00
RE: Adding Adsense code snippet - by datiswous - 2018-02-01, 00:29:29



Users browsing this thread: 1 Guest(s)