How to use webpack in WordPress theme? I want some scripts to load in the footer, some in the header and some with script parameters

What is the right and clean way to load these files in WordPress? The same way as you’ve always done it, wp_enqueue_script. WordPress is unaware that webpack created the javascript file, and it is just that, a javascript file. This is true wether it contains jquery, was written by hand, or was created by a … Read more

WordPress How To create Word document from theme and run it on new order created

require_once( ‘/word/vendor/autoload.php’ ); will try to load starting from the root directory of your webserver. You’re probably looking for something like require_once( ‘./word/vendor/autoload.php’ ); or perhaps require_once( plugin_dir_path( __FILE__ ) . ‘word/vendor/autoload.php’ );. (Note that plugin_dir_path() can be used in themes as well as plugins; the plugin part of its name is misleading.)