Warning: strpos() expects parameter 1 to be string, array given in
-
Warning: strpos() expects parameter 1 to be string, array given in https://www.namesite.it/home/wp-content/plugins/ecommerce-product-catalog/functions/functions.php on line 927
this is…What is wrong?
function modify_product_search( $query ) { if ( !is_admin() && $query->is_search == 1 && $query->is_main_query() && ((isset( $_GET[ 'post_type' ] ) && strpos( $_GET[ 'post_type' ], 'al_product' ) === false) || (!isset( $query->query_vars[ 'post_type' ] ) || (isset( $query->query_vars[ 'post_type' ] ) && strpos( $query->query_vars[ 'post_type' ], 'al_product' ) === false ))) ) { add_filter( 'posts_search', 'exclude_products_search', 10, 2 ); } }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Warning: strpos() expects parameter 1 to be string, array given in’ is closed to new replies.