Sorry for posting this again, but I still need to find a solution for this:
Ref topic:
https://support.metabox.io/topic/disable-rwmb_meta-on-search-results/
I am trying the suggested code below:
add_filter( 'rwmb_meta', 'prefix_meta', 10, 4 );
function prefix_meta( $meta, $key, $args, $post_id )
{
if ( ! is_search() )
return $meta;
// If this is search page, do whatever you want with the returned value $meta
$meta = '';
return $meta;
}
however it gives me following error:
Warning: Missing argument 4 for prefix_meta()
Sometimes it says missing argument 2 or 3 etc..
The problem is while I am search anything, the results pick all the metaboxes of first result (at the top either its post/page) and applies on the search results page, if the first result has RED BACKGROUND selected in meta boxes, it will make the search result page as red. I need to completely ignore rwmb_meta() on search results page.
Please help !
regards