I have a banner (call to action across the entire width of the page, so not as wide as the screen, but only as wide as the page) as code.
Tripoli Theme
What doesn’t work: I don’t want to edit the theme files because I don’t know anything about it. The banner should only be placed between the 1st and 2nd sections (tags).
With branding / design - code injection, this doesn’t work in the header or in the footer. Sometimes the banner is at the top (header) or at the bottom (footer). How can I place the banner between the sections?
The best way to do this really would be to edit the theme. Code injection is used to insert bits of javascript or css styles, but not intended for adding big chunks of HTML.
If you can’t edit the theme, the next best option would be to use some javascript to insert the banner where you want it on the page. If you have HTML already, let’s going to look something like… (in the code injection footer)
<script>
let yourHTML = `<div class="blahblah".......>..... put your stuff here ... </div>`
let targetElement = document.querySelector('.c-section');
let newBanner = document.createElement('div')
targetElement.appendChild(newBanner);
newBanner.innerHTML = yourHTML;
<script>
not tested live and probably has at least one typo, but that’d be the idea!