Include files

Include any JavaScript and CSS to the pages

Include Assets screenshot

The WP Coder plugin provides a convenient option to include external CSS or JS files on your WordPress site by simply inserting the link to the file. This means you can utilize stylesheets or scripts hosted elsewhere without having to upload them to your own site.


How to Use

  1. Navigate to WP Coder → Scripts & Styles in your WordPress dashboard.
  2. Insert the URL of the CSS or JS file you wish to include.
  3. Save your changes — the file will be loaded across your site or where your snippet is applied.

This feature is particularly useful for:

  • Adding libraries or frameworks hosted on a CDN (Content Delivery Network).
  • Maintaining consistent versions of scripts or styles across multiple sites.

⚡ Defer and Async Attributes for JS Files

WP Coder allows you to add the defer and async attributes to external JavaScript files you include:

  • defer → Delays execution until the full HTML document is parsed.
  • async → Loads and executes the script asynchronously, without blocking the page render.

Both options can improve site performance, depending on how your JavaScript interacts with your webpage.

[!INFO]
Always test changes thoroughly before applying them to your live site. Including external files may sometimes cause conflicts or unexpected behavior.


🗑️ Dequeue Styles and Scripts PRO

Easily manage your site’s performance by using WP Coder’s Dequeue function to remove unnecessary CSS and JavaScript files.
This feature empowers you to streamline your website’s loading times and optimize resource delivery.


In-depth Explanation

  • Selective Script Management:
    Disable specific stylesheets and scripts that are not essential for certain pages or posts.
    By unloading these resources, you can reduce page load times and improve overall site speed.

  • Efficient Loading:
    Gain full control over your site’s resource loading.
    Dequeuing extraneous files ensures visitors receive only what they need, resulting in faster performance.

  • Usage:
    Within the WP Coder interface, specify the handles of the scripts or styles you want to exclude.
    WP Coder will handle the rest automatically.


Operational Guidance

  • Precision: Be precise when selecting assets to dequeue. Removing essential files may break site functionality.
  • Testing: Always test in a staging environment before applying to production.
  • Recovery: If an error occurs, you can revert changes or use WP Coder’s Safe Mode to troubleshoot safely.

By carefully applying the Dequeue option, you can significantly enhance the performance and user experience of your WordPress site.