Streaming live at 10am (PST)

How to remove site custom head / body code from a page?

#1

I must remove Site custom head / body code from a specific page. How do to this without manually copying code edits to each every page?

#2

Are you talking about a page or a CMS collection item detail page?

#3

@webdev
Both.

For example,

  • how do I strip site custom code from “/login” (static page)
  • how do I strip site custom code from “/blog/blog-page” (CMS page)

Must inject modified custom code on respective /HEAD and /BODY sections of those pages, that EXCLUDE site custom code.

All other pages will have the same site custom code in head and body.

Current workaround is disabling site custom code and manually pasting it on every single page and cms page. > not ideal.

#4

There is no way do this, without following your own observation.

True, but at least you can.

#5

@webdev
Are you aware of any easy script or code that overrides SITE head and body code, and then replaces it with the new code only on two pages?

(The purpose here is to resolve GTM conflict)

#6

You could write conditional script that works as a loader based on the current path using custom code.

1 Like
#7

Ok I shred this thread with my dev I think that makes sense thank you!!