Home › Forums › Weaver Xtreme Theme › the wp_head() and wp_footer()
- This topic has 10 replies, 4 voices, and was last updated 1 year, 1 month ago by
Yvonne.
-
AuthorPosts
-
September 12, 2024 at 08:10 UTC - Views: 70 #75025
Yvonne
ParticipantDoesn't the Weaver Xtreme template use the wp_head() and wp_footer() functions. I wanted to load required scripts in the footer or header to improve page performance
September 12, 2024 at 09:52 UTC - Views: 67 #75026User
ModeratorThere is a capability of sorts here: Admin > Appearance > Weaver Xtreme Admin > Advanced Options.
See: <HEAD> Section tab and HTML Insertion tab
Regards.
September 12, 2024 at 15:47 UTC - Views: 58 #75027scrambler
ModeratorI am not 100% why you mention these functions. May be explain in more details so @weaver can pitch in.
If you need script to be in a specific location, you can use the HTML Insertion area like header or footer ones.
We use to be able to inset PHP in content areas by activating PHP in Xtreme option but I believe that was removed for security concerns. There may be plugins that allow you to insert PHP in content, or @weaver may know more
September 12, 2024 at 18:21 UTC - Views: 61 #75028Weaver
KeymasterWeaver Xtreme calls wp_head() and wp_footer() in the appropriate places. It adds its own functionality with wp_head and wp_footer via an add_action calls (as is standard WP practice for themes).
You could create a child theme to replace Weaver’s own wp_head actions. Creating a child theme requires a fairly technical understanding of the parent theme – including understanding at least part of the theme’s source code.
The question is what “required scripts” are you talking about? Weaver already optimizes the loading of the scripts it requires in the header or footer as needed, so I’m not really sure what you might have in mind. If you need to access theme code, the appropriate way to do that is with a child theme.
Plugins have their own rules and standards for adding scripts.
And the fact of the matter is that tweaking the order of loading scripts really has essentially zero measurable effects on loading a site, at least for very slow internet access speeds. Even the 2 or 3 Mb access rates found on 4G phones, script optimization has minimal effects. Loading huge scripts that do a lot of processing might make a difference, so it depends if users with old phones using are a critical part of your target audience.
But with today’s typically fast internet connections, it has become very difficult to detect much speed difference for a WordPress site. It is likely more productive to put your efforts into overall site design and content.
September 13, 2024 at 07:06 UTC - Views: 46 #75032Yvonne
ParticipantWtyczka do optymalizacji strony pod kątem wydajności ma opcję przenoszenia skryptów do stopki. Nie muszę nic wpisywać i szukać, robi to sama. Ale już wszystko sprawdziłem i nasz/Twój motyw jest idealny, ponieważ wszystko działało idealnie
Translation (added by moderator):
The page optimization plugin for performance has an option to move scripts to the footer. I don’t have to type anything in or search, it does it itself. But I already checked everything and our/your theme is perfect because everything worked perfectly
September 13, 2024 at 16:12 UTC - Views: 34 #75033scrambler
ModeratorIf you change the execution order of the theme script, you will most likely break the theme. when each weaver script is activated is essential to their well working.
So I would not mess with the theme script execution order.
If this is about other scripts that you added, you can add them yourself in the area you like.
July 30, 2025 at 11:58 UTC - Views: 29 #75822Yvonne
ParticipantSmush PRO inserts the lazy image loading script into the footer or header. For this to work, the theme must support the wp_footer() or wp_head() functions.
July 30, 2025 at 15:51 UTC - Views: 21 #75823scrambler
ModeratorIf the plugin moves its own scripts (not the theme one), then there is no issue
July 30, 2025 at 23:00 UTC - Views: 22 #75824Weaver
KeymasterWeaver Xtreme supports wp_head and wp_footer in the standard way.
Are you sure you really need lazy load? With host and services like iCloud today, lazy loading can be less important. Lazy loading helps for long pages, or ones with many images. And it should be applied only to images below the fold. Just providing this comment because setting up effective lazy loading might require extra effort and site content maintenance that might not be worth the effort.
July 31, 2025 at 02:19 UTC - Views: 15 #75825User
ModeratorI am in agreement with Weaver regarding lazy-load.
If you have your images optimized by Smush or Cloudinary or such, the images are all delivered at the best possible size and format for the device receiving them.
If you run any such image optimized site through https://tools.pingdom.com/ you will see all the images are delivered as one group (consecutively and at the same time), and all within <0.1s from the first to last.
From that Pingdom chart data, it is clear that adding a few more images will have no measurable impact in the delivery the site as a whole.
I have a fully optimized Cloudinary image site and by turning “lazy-load” off, I achieved a noticeable and measurable reduction in both bandwith and load speed.
If however, one has an non-optimized site with overly large image files, then certainly lazy-load will provide improved initial load times for users. But I’m sure that is not what you have designed 😊
Hope this helps!
August 1, 2025 at 11:49 UTC - Views: 7 #75829Yvonne
ParticipantThanks guys. The website https://tools.pingdom.com/ really helped me a lot and I fixed my lazy loading.
-
AuthorPosts
- You must be logged in to reply to this topic.

