Wrong show products after searching

HI,

please check webpage: https://aceautodiely.sk and and you tree searching “shell” on the up search bar. Show products is wrong.

How show products after searching e.g. as here???

Thanks.

Hi Teem,

Thanks for writing in! Upon testing, I see the search results are working.

Do you want to change the style of your search results page ? or are you getting incorrect search results ?

If you want to change the search result layout, try following this thread (https://theme.co/apex/forum/t/search-result-page-customization/21966/5).

Thanks!

Thank you.

Yes, I want change the style of search result page. I’ve tried what you sent, but now it does not show any results.

https://aceautodiely.sk/?s=shell

Hi Teem,

I have checked your referenced link above and when testing, I see the following error on the console log.
AbortError: The operation was aborted.

Could you please try disabling your 3rd party plugins and re-test your issue again. You can use this plugin called health check (https://wordpress.org/plugins/health-check/) to test your site without affecting your live site users. Refer to the following guide for more information (https://www.youtube.com/watch?v=nO1nP1gBstM).

If you’re still having issues, provide us with your login credentials in a secure note.

Thanks!

Hi Teem,

Upon checking your website, I could see that you’ve customized the search page to enable the masonry style.

The masonry style will apply to the .hentry class(for posts only) and your search results display the products only(which don’t have the hentry class).

To fix it, please add this custom code under functions.php file locates in your child theme:

add_filter( 'post_class', 'x_product_class' );
function x_product_class( $classes ){
	if( get_post_type() == 'product' ){
		$classes[] = "hentry";
	}
	return $classes;
}

Hope that helps and thank you for understanding.

Thank you very much.

How do I set up to show as classical products in the category?
e.g.: https://aceautodiely.sk/kategoria-produktu/oleje/

Third party developer module…

Hi Teem,

You mean apply the classic products layout to search page? That’s not possible since the layout itself is handled by Woocommerce and not Wordpress, while search page uses the theme layout. That would require custom development to fully match them.

Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.