When building a WordPress website, there are many occasions when we need to link to external scripts, for example:
It is always easy to hardcode the link into the header.php file, however, that is not best practice when it comes to WordPress. WordPress comes with a powerful enqueue feature that comes equipped with version control, dependencies and other features.
Paste the above script into your functions.php (or ditch the function, and just copy the enqueue line if you already have an enqueue function), change the URL, and you’re done.
You can also set dependencies if you wish — for more information, please visit the official WordPress documentation.
Unsure of where to insert this? Don’t want to break anything? Our team of WordPress developers in Singapore can accomplish this job for you safely and efficiently. We are highly experienced in WordPress and web development and are equipped in solving any issues you might be facing.
Do note that this guide is purely for enqueuing external scripts on WordPress. For other WordPress functions, please contact us if you need help. Our team of WordPress developers in Singapore will be happy to assist you!
Discover how thoughtful web design and user experience strategies can transform first-time visitors into loyal…
Trust is a critical factor in online conversions. Learn how modern website design builds credibility…
Landing pages are designed for one purpose: conversion. Learn how to craft focused, impactful landing…
White space is often mistaken for empty space, but in web design it plays a…
Users today decide within seconds whether a website deserves their attention. Designing digital experiences that…
Prototyping is an essential step in UX design, but not all serve the same purpose.…