WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#36350 closed feature request (duplicate)

Insert content right after the opening BODY tag

Reported by: kmarcink Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Description

Hi there,

Could there be an action or a filter to enter code just after the opening BODY tag?

Google Tag Manager requires entering its tracking code there. I need to do it on each new website. Entering it into a theme file will make it disappear from the site when a client will want to change the theme.

Thanks,
Marcin

Change History (3)

#1 @rabmalin
3 years ago

I believe this should be done in theme. It has nothing to do with core.

#2 @johnbillion
3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi @kmarcink. There was a push to implement a standard set of theme hooks a couple of years ago, but it never went very far.

More info:

#3 @kmarcink
3 years ago

Thanks guys for quick reply.

Maybe in the future, this standard will be used by theme developers.

Note: See TracTickets for help on using tickets.