I’ve removed the position: fixed; for now so my site it operational in the meantime
Hi @apremierdj
Thanks for pointing this out, that’s a bug I’ll put in a fix for tonight. Thanks.
Thanks, I just tested with your update and the header/ nav bar is still being hidden. i’ve put values in the top margin and padding but does not make any changes after clearing cache etc.
abelldjcompany.com
I’ve changed to “static” for now so my site it operational in the meantime
Hi @apremierdj
First, for the header margin and padding values you can’t just put a number, you need to put a unit afterwards, usually thats px, so it would be 150px. Secondly, looks like you probably want the banner fixed in desktop mode, so keep it as static in the positioning field up top, and in Website Custom CSS:
@media only screen and (min-width: 990px) {
.simple-banner {
position: fixed;
}
header {
margin-top: 40px;
}
}
-
This reply was modified 6 years, 1 month ago by
rpetersen29.
Appears to look great on desktop. thanks for clarifying.
The header is still covered on mobile. any advice?
Figured it out. Thank you!
Is there a way to disable on “Posts”?
Hi @apremierdj
The recent update, 2.4.2, should fix the disabled pages issue you were seeing. Thanks for bringing this up!
I’m referring to “Posts” not “Pages”
I’d like to disable the banner on “posts”
Yes, I seen this and added but does not appear to work on my site. Are you able to see why?
https://www.abelldjcompany.com/creative-wedding-favor-ideas/
The javascript looks for something common in your posts url:
document.addEventListener('DOMContentLoaded', function(){
if (window.location.pathname.includes("post")){
document.getElementById('simple-banner').remove();
}
}, false);
window.location.pathname.includes("post") looks for post in your URL. If you’re looking to remove from a specific page then use this:
document.addEventListener('DOMContentLoaded', function(){
if (window.location.href === "YOUR_WEBSITE_URL_HERE"){
document.getElementById('simple-banner').remove();
}
}, false);
If you want a few specific urls then:
document.addEventListener('DOMContentLoaded', function(){
var urls = ["URL1", "URL2", "URL3"];
if (urls.includes(window.location.href)){
document.getElementById('simple-banner').remove();
}
}, false);