WordPress randomly redirects with 301 after logging in

It seems, you have not set opcache.validate_root=1 in php.ini. It’s mandatory for chrooted php-fpm with multiple pools (and unfortunately not very clearly documented). RTFM: https://www.php.net/manual/en/opcache.configuration.php#ini.opcache.validate-root

Make WooCommerce product categories only show images on homepage

Try running your function hooked into the template_redirect action like so: <?php function fp_categories() { if( is_front_page() ) { add_action( ‘woocommerce_before_subcategory_title’, ‘woocommerce_subcategory_thumbnail’, 10 ) ; } else { remove_action( ‘woocommerce_before_subcategory_title’, ‘woocommerce_subcategory_thumbnail’, 10 ) ; } } add_action( ‘template_redirect’, ‘fp_categories’ ); ?> I’m fuzzy on the logic why this works – I believe otherwise the functions … Read more