[Resolved] Which hook to use before main content for “mobile devices”

Home Forums Support [Resolved] Which hook to use before main content for “mobile devices”

Home Forums Support Which hook to use before main content for “mobile devices”

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1646739
    Huseyin

    Wondering how could I get AD placed here in mobile https://ibb.co/DbTN7r0 normally i use the generate_before_main_content hook. Where it works on desktop https://ibb.co/Q9VQ34s which hook do i need use for mobile devices?

    #1646777
    David
    Staff
    Customer Support

    Hi there,

    you would use the same Hook.
    Hooks are simply put; placeholders in the themes templates, and that template is used regardless of the device size.

    #1646794
    Huseyin

    thanks for the reply,

    I’m using the generate_before_main_content, however in mobile devices, i can’t see the hook working, I find after the content. Please, could you heck the links I provided in the main post.

    Thanks

    #1646928
    David
    Staff
    Customer Support

    If i remove this CSS you have in Customizer > Additional CSS:

    @media (max-width: 767px) {
        .ai-viewport-1 {
            display: none !important;
        }
    }

    then the advert is showing in the correct place.

    The advert below the content is an auto placed advert – its positioned is controlled by your Googl adsense setup.

    #1647387
    Huseyin

    However, I don’t have that CSS inserted.

    #1647459
    Ying
    Staff
    Customer Support

    Your CSS is still there, and as you can see, once the CSS is removed your ads shows up.
    https://www.screencast.com/t/QNkDIN6I

    Try to disable all the CSS you added to see if the problems still persists.

    Let me know πŸ™‚

    #1647468
    Huseyin

    Ohh I forgot to mention that I’m using Ad Inserter Pro plugin to display the ads using the hooks. https://ibb.co/5vFVq4x

    So I think I need to contact plugin developer then. Because I don’t have CSS inserted like that.

    #1647509
    Ying
    Staff
    Customer Support

    That might be where the CSS is coming from.

    You could try to look into the plugin first to see if there’s any settings for different devices.

    Hope the issue is gonna be solved soon πŸ™‚

    #1647850
    Huseyin

    Thanks Ying,

    I will mark this thread as resolved, as its a problem with a plugin, not generatepress, I’m very sorry for wasting your time guys.

    #1648640
    Ying
    Staff
    Customer Support

    No worries πŸ™‚

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.