Level Up Your WordPress 6.8 Site with These Practical Code Snippets

Published on May 19, 2025 by Sebastian Moran in MainWP Blog under Tips & Tricks
Heads up: This page may include affiliate links. Read the full disclaimer.

WordPress 6.8 is the final major release of 2025. Over the course of 2025, new features and improvements will go out in minor WordPress core releases.

One site performance feature that the 6.8 release includes is for speculative loading using the speculation rules API. The speculative loading feature has outstanding cross-browser support, and using the feature will help improve the front-end performance in most cases.

The following code snippet excludes a specific URL in this case, the cart URL from being loaded using the speculative loading feature. 

If you want to increase the eagerness of the speculative loading feature in WordPress 6.8, you can use this code snippet.

If you needed to enable menus to make them publicly accessible, you can now do this using this code snippet in the REST API in WordPress 6.8. The default behavior in the WordPress 6.8 release is that menus are not publicly accessible in the REST API on a site.

These are only some of the many helpful code snippets that apply to the new features and improvements included in the WordPress 6.8 major core release.

MainWP has a solid, easy-to-use code snippets plugin that allows code snippets to be saved and executed on connected sites.

Useful Links

https://core.trac.wordpress.org/ticket/62503

https://developer.mozilla.org/en-US/docs/Web/API/Speculation_Rules_API

Share

Manage Unlimited WordPress Sites from One Dashboard!

  • Privacy-first, Open Source, Self-hosted
  • Easy Client Management
  • 15+ & 30 + Premium Add-ons
  • Bulk Plugins & Themes Management
Get Pro Now

Categories

Recent Posts

Search MainWP.com

[searchwp_form id="1"]