After hours of trying to figure out what is happening with the search field on my client website, the thing is that doesn't mind what I search, the search always shows the same result, in this case a product page. (In the website are posts, products, news...). My intention is to display all product pages of the same category, for example, if I search for "Axles", display all the Axles products.
I decided to go for debugging and those are the errors that I got:
[28-Oct-2021 11:43:50 UTC] PHP Notice: Trying to get property 'count' of non-object in /var/www/vhosts/dev2020.distag.com/httpdocs/wp-content/themes/Divi_Child/header.php on line 43 [28-Oct-2021 11:44:00 UTC] PHP Notice: Trying to get property 'parent' of non-object in /var/www/vhosts/dev2020.distag.com/httpdocs/wp-content/themes/Divi_Child/header.php on line 27 [28-Oct-2021 11:44:00 UTC] PHP Notice: Trying to get property 'taxonomy' of non-object in /var/www/vhosts/dev2020.distag.com/httpdocs/wp-content/themes/Divi_Child/header.php on line 28 [28-Oct-2021 11:44:00 UTC] PHP Notice: Trying to get property 'term_id' of non-object in /var/www/vhosts/dev2020.distag.com/httpdocs/wp-content/themes/Divi_Child/header.php on line 28 [28-Oct-2021 11:44:03 UTC] PHP Notice: Trying to get property 'count' of non-object in /var/www/vhosts/dev2020.distag.com/httpdocs/wp-content/themes/Divi_Child/header.php on line 43 [28-Oct-2021 11:44:16 UTC] PHP Notice: Trying to get property 'parent' of non-object in /var/www/vhosts/dev2020.distag.com/httpdocs/wp-content/themes/Divi_Child/header.php on line 27 [28-Oct-2021 11:44:16 UTC] PHP Notice: Trying to get property 'taxonomy' of non-object in /var/www/vhosts/dev2020.distag.com/httpdocs/wp-content/themes/Divi_Child/header.php on line 28 [28-Oct-2021 11:44:16 UTC] PHP Notice: Trying to get property 'term_id' of non-object in /var/www/vhosts/dev2020.distag.com/httpdocs/wp-content/themes/Divi_Child/header.php on line 28 [28-Oct-2021 11:44:20 UTC] PHP Notice: Trying to get property 'count' of non-object in /var/www/vhosts/dev2020.distag.com/httpdocs/wp-content/themes/Divi_Child/header.php on line 43
And in the photo you can see the specific lines of code;
Hope some of the devs over here can help me and find a solution for that.
Many thanks.