diff --git a/app/theme/wp/components.go b/app/theme/wp/components.go index 67ed83f..c225364 100644 --- a/app/theme/wp/components.go +++ b/app/theme/wp/components.go @@ -34,7 +34,7 @@ func CalComponents(h *Handle) { }, nil, h.components[h.scene], h.components[constraints.AllScene]) }) for k, components := range componentss { - key := str.Join("calComponents-", k) + key := str.Join("calComponents-", h.scene, "-", k) key = h.ComponentFilterFnHook("calComponents", key, k) ss := reload.GetAnyValMapBy("calComponents", key, h, func(h *Handle) []Components[string] { r := slice.FilterAndMap(components, func(t Components[string]) (Components[string], bool) { diff --git a/app/theme/wp/customheader.go b/app/theme/wp/customheader.go index f51eea7..f0a6249 100644 --- a/app/theme/wp/customheader.go +++ b/app/theme/wp/customheader.go @@ -131,7 +131,7 @@ func CustomVideo(h *Handle) (ok bool) { "/wp-includes/js/dist/hooks.min.js", "/wp-includes/js/dist/i18n.min.js", "/wp-includes/js/dist/a11y.min.js", - "/wp-includes/js/wp-custom-header.js", + "/wp-includes/js/wp-custom-header.min.js", } scripts = slice.Map(scripts, func(t string) string { return fmt.Sprintf(` @@ -144,7 +144,7 @@ func CustomVideo(h *Handle) (ok bool) { {"wp-", ""}, })) }) - h.PushGroupFooterScript(constraints.AllScene, "wp-custom-header", 10, scripts[0:len(scripts)-2]...) + h.PushGroupFooterScript(constraints.Home, "wp-custom-header", 10, scripts[0:len(scripts)-2]...) var tr = ` @@ -157,7 +157,7 @@ wp.i18n.setLocaleData( { 'text direction\u0004ltr': [ 'ltr' ] } ); ` - h.PushFooterScript(constraints.AllScene, + h.PushFooterScript(constraints.Home, NewComponent("wp-a11y-js-translations", tr, true, 10, nil), NewComponent("VideoSetting", hs, true, 10, nil), NewComponent("header-script", scripts[len(scripts)-1], true, 10, nil),