Top of page
In Topicunder Snippets

Snippets

Collection of quick and easy code snippets of HTML, CSS, JavaScript, WordPress, PHP, jQuery, Servers and more for web developers.

How to offset anchor links from snapping behind a sticky header

Learn how to prevent and offset anchor links from scrolling behind a sticky header by using scroll-margin-top CSS property.

Learn to add an autocomplete input with HTML datalist

Learn how to create a fully functional autocomplete input field with just and only a few lines of plain HTML code, no JavaScript required.

Optimize Google Fonts by loading only Characters you need

Cut down 90 per cent off the size of Google Fonts request by specifying only those characters you would need in your website.

Smooth scroll to an anchor link using CSS

Discover scroll-behavior, a native CSS property that offers smooth scrolling transition when you click an anchor link in a page.

Add Jetpack Image CDN To Advanced Custom Fields Image Fields

Add WordPress JetPack Photon CDN or JetPack Image CDN filter to WordPress Advanced Custom Fields (ACF) image field on themes and plugins.

Fix 'XMLHttpRequest cannot load / CORS' error when WordPress address and Site address differ

Workaround to an issue causing XMLHttpRequest cannot load / CORS error in WordPress admin dashboard when using different WordPress address and Site address.

Remove Query Strings From WordPress CSS and JavaScript Resources

How to guide on removing query strings from your WordPress static resources or CSS and JavaScript files using a simple code or a WordPress plugin.