[Support request] How to place AdSense Ad unit without any 3rd-party plugin?

Home Forums Support How to place AdSense Ad unit without any 3rd-party plugin?

  • This topic has 1 reply, 2 voices, and was last updated 2 months ago by David.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1372308
    Gulshan Kumar

    Many themes like Newspaper comes with inbuilt solution for complete AdSense ad unit management.

    My requirements :-

    1. I need to place Ad unit after nth paragraph
    2. I need to conditionally display Ad unit on Desktop in x size and y size at mobile (I’d always prefer CSS for it over JS, I can do this but would be great inside Dashboard)
    3. I do not want to manually place using Shortcode.
    4. Please do not suggest me a plugin. I just hate it, strictly.
    – It add lot of nonsense garbage CSS and JS to override Dashboard styling, etc
    – Sometime it gets hack (Suddenly)
    – I do not want to update time to time and break suddenly
    – What if they sell plugin and become paid in day-light (badly missing *****!) or insert backdoor later after getting into hand of bad author?

    We all have been there. More plugins = More security glitch.
    To be more aware, read this blog 😉 https://www.wordfence.com/blog/

    Then we come to paid firewall and what not!!

    I don’t want GP to be bloated with useless features. Neither I am saying that other theme is best. I like GP. There should be optional tracking feature to better understand what we use or not.

    So, let’s consider GeneratePress should have own special module “Advt’ to manage all stuffs at one place.

    I see Elements module is helpful but not much in case of Advt.

    #1372341
    David
    Staff
    Customer Support

    Hi there,

    themes that rely on adding this type of feature are built for a specific niche.
    Whereas we consider GP as a foundation theme, allowing users to build whatever they require. And we definitely don’t add code for niche requirements as this just adds redundant code to those who don’t need it.

    But we have seen many requests about adding content inside the Loop, and we will be including a hook for that purpose in the next theme update.

    However, what we do not do is filter the post content. This is most definitely plugin territory. You can do that of course without a plugin, such as this stack overflow method:

    https://stackoverflow.com/questions/48991557/adding-ads-after-first-and-second-paragraph-of-wordpress-post

    When it comes to sizing adverts etc that is not within a themes control. Adverts are generally served in an embed/iframe that have their own CSS/JS Payload that cannot be overwritten from a remote server.

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