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

How do I hide out of stock products from homepage but not from catalog?

Assuming you are using storefront default homepage template. You can filter products before displaying on hompepage function rfl_show_backorders( $is_visible, $id ) { $product = new wC_Product( $id ); if ( ! $product->is_in_stock() && ! $product->backorders_allowed() && is_front_page() ) { $is_visible = false; } return $is_visible; } add_filter( ‘woocommerce_product_is_visible’, ‘rfl_show_backorders’, 10, 2 );

Can somebody tell me how I am supposed to be using blogs.dir for network / MU sites?

blogs.dir was the way to handle specific blog plugins and themes when it was WordPress-MU but since version 3 came out and the WordPress-MU was integrated into WordPress Core and introduced WordPress Multisite, that’s no longer the story. WordPress Handles the creation of the new blogs/sites in the database and mainly in the background so … Read more