Top of page
In Topic

Snippets

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

How to offset anchor links from snapping behind a sticky header

We’re used to sticky headers that move along with our scroll in the website. For some websites (like Amazon) it offers users a way to access the most important pages…

Learn to add an autocomplete input with HTML datalist

Looking for an easy way to add autocomplete values to a form input without getting your hands dirty with JavaScript? Well, you could create autocomplete input with just and only…

Optimize Google Fonts by loading only Characters you need

There is always a situation where you’re web designer friend designed a web page with a logo or certain unique title/heading in an entirely different font than the one used…

Smooth scroll to an anchor link using CSS

Throughout the years, I have used JavaScript to achieve smooth scrolling when clicking an anchor link. It does the task done most of the time but doesn’t feel polished enough.Discover…

Add Jetpack Image CDN To Advanced Custom Fields Image Fields

To maximize website performance in a WordPress site we should serve images and other static assets via a content delivery network (CDN). Jetpack plugin, the ultimate toolkit for WordPress offers…

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

While building a headless WordPress site (like this website), our backend (which is the WordPress part) resides in a different domain (or in a subdomain/subfolder of the main domain) and…

No more articles