Archived topic
My header ad is not working
7 replies · Started by Nishant on August 19, 2020
I am using generate press premium theme.
I am using ad unit size 970 x 250 in the header but it is not showing properly. Half of the ad is not visible.
Please look into the matter and help me to resolve it.
Hi there,
the header widget is set to only fill 50% of the space available.
You can change that with this CSS:
.header-widget {
max-width: 100%;
}
There is one more problem after implementing css code. The site title and tag comin in the same line with the advertisement. I want an advertisement below the title of site
It may be better to use the generate_after_header_content hook for your ad: https://docs.generatepress.com/article/hooks-element-overview/
If you want to use the Header Widget, try adding this CSS:
.inside-header {
display: flex;
flex-direction: column;
}
.header-widget {
order: 10;
}
It is helpful but I have one more question. How can I hide the top bar widget in the desktop and show it on mobile? Please help
try this CSS:
@media(min-width: 769px) {
.top-bar {
display: none;
}
}
Thank you so much
You're welcome