wp_dequeue_style and wp_dequeue_script not working on server but does work on local xampp

If you want to dequeue scripts & styles for a specific page based on the slug of the page. You can get the slug in various ways and use it instead of $_SERVER[‘REQUEST_URI’]. Use if( is_page( array( ‘my_page’) instead of if(basename($_SERVER[‘REQUEST_URI’])==’my_page’) function wpse_289574_dequeue_scrips() { if(is_page( array( ‘my_page’)){ wp_dequeue_style( ‘taxonomy-image-plugin-public’ ); … } } How to … Read more

Gutenberg Block Development: Trying to add custom js script to npm start command by modifying webpack.config

Thank you all for your help! I was on it since days! I found my problem: https://webpack.js.org/concepts/entry-points/ helped me to find the solution Apparently path.resolve( process.cwd(), ‘src’, ‘slider.js’ ) was not working: replacing by simple string path fixed the problem: const defaultConfig = require( ‘@wordpress/scripts/config/webpack.config’ ); module.exports = { …defaultConfig, entry: { …defaultConfig.entry, slider: ‘./src/slider.js’, … Read more