sebastienfry
Forum Replies Created
-
Forum: Plugins
In reply to: [Link Juice Optimizer] PHP 8.0 CompatibilityHello,
Thank you very much for your plugin, it is really great!
I recently tried to switch from php 7.4 to php 8.0 but I have an error message that appears on my website:
Link_Juice_Optimizer_Public::{closure}(): Argument #2 ($key) must be passed by reference, value given in /wp-content/plugins/link-juice-optimizer/public/class-link-juice-optimizer-public.php on line 617I also tried with version 8.1 & 8.2. I also have the same error message.
It works well with php 7.4Apache server
PHP 8.0 (8.1 & 8.2)
MariaDB 10.4
WordPress 6.1.1Can you please confirm/comment or suggest something about this problem ?
Kind regards,
Sebastien
Forum: Plugins
In reply to: [WooCommerce] remove loop on some category product pageI’d like to remove the loop on some category product page.
My goal is to customize category product page with gutenberg block.
I already know how to add description before and/or after products loop.
Now I’d also like to remove all the products on the category product page (but only in one or two category, not all category product page).For exemple, this snippet is to remove all the products from shop page.
I need the same for category product page :add_action( 'pre_get_posts', 'stuff_remove_products_from_shop_page' ); function stuff_remove_products_from_shop_page( $q ) { if ( ! $q->is_main_query() ) return; if ( ! $q->is_post_type_archive() ) return; if ( ! is_admin() && is_shop() ) { $q->set( 'post__in', array(0) ); } remove_action( 'pre_get_posts', 'stuff_remove_products_from_shop_page' );