Skip to content

Helper function to enqueue CSS & JS files from static files

License

Notifications You must be signed in to change notification settings

ahmu83/wp-enqueues

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wp-enqueues

Helper functions to enqueue CSS & JS files from two static files named .js-enqueues and .css-enqueues from the theme's root directory

Include enqueues.php file in your theme's functions.php

Add your CSS/JS files in the respective .js-enqueues and .css-enqueues files and your assets will be enqueued to your theme

Make sure you use the !! delimiter to add arguments

i.e, custom-styles !! /css/custom.css !! parent-theme-styles,some-other-style !! rand !! all

i.e, custom-scripts !! /js/custom.js !! jquery,some-other-script-handle !! false !! all