Site logo

Archived topic

leader board ad 728*90 on desktop at top and on mobile.

17 replies · Started by surendra1506 on September 13, 2022

Viewing posts 1–15 of 18

Hi team I want to create an ad unit on top of the site. The logo to the left side and the 728*90 ad is on the right side.

The menu will be below them.

Also, I want it to show only on the desktop. For mobile, I want to display a 300*50 ad on top.

Thanks in advance.

Hi there,

1. set the Customizer > Layout > Primary navigation -> Location to Below Header

2. Create a Hook Element to add your Banners:

https://docs.generatepress.com/article/hooks-element-overview/

2.1 This hook can contain both banners simply use a DIV and a CSS class to hide the relevant banners eg.


<div class="hide-on-tablet hide-on-mobile">
You desktop banner here
</div>
<div class="hide-on-desktop">
You mobile banner here
</div>

2.2 Set the Hook to: generate_after_logo

2,3 Set the Display Rules to the Entire Site

1. set the Customizer > Layout > Primary navigation -> Location to Below Header

Hi David, I can't see this option in my customizer. Please help

OK, go to Customizer > Layout > Header and Disable the Navigation as Header option.
Then set the Customizer > Layout > Primary navigation -> Location to Below Header

Thanks, David,

I got the desired result by implementing as you instructed.

one last thing I request you to please tell me how to get the ads to the right side.

Currently, it is too close to the site logo.

Try adding this CSS:

.site-logo {
    margin-right: auto;
}

Thank you so much David.

My all problems are now resolved.

Thanks a lot for the quick reply and rectification.

Thanks again

Glad to be of help!

Hi David,

For Mobile view my site logo is coming above followed by primary navigation below it.

I want to keep site logo within primary navigation at the center and search icon to right.

please help me to achieve this.

classmate4u.com

In Appearance > Customize > Layout > Header, can you first set the Mobile Header on, and add a logo. Once you've done that, let us know.

Hi Fernando,

I am done with as you instructed.

Try adding this CSS:

@media (max-width: 768px) {
    #mobile-header .menu-toggle {
        order: -1;
        margin-right: auto
    }
    .menu-bar-items {
        margin-left: 39px;
    }
}
This archived topic is closed to new replies.