Layouts not visible in the menu

Hello, the piece of code you see in my previous post (linked above) is creating a glitch on the layouts menu: it doesn’t display nothing. I need to use this code, can you help me to understand if there is something wrong in it?

function searchfilter($query) {

if ($query->is_search && !is_admin() ) {
    $query->set('post_type',array('product'));
}
 
return $query;
}
 
add_filter('pre_get_posts','searchfilter');

Hi @dcheese,

Unfortunately, we don’t offer support for issues related to custom coding. I would suggest you hire a developer who can assist you with customization, or you can avail of our newly launched service called One, where we answer questions beyond normal theme support.

Thanks

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