Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save andreiglingeanu/68f20cab856a530f2a3fea1af2266f0c to your computer and use it in GitHub Desktop.
Save andreiglingeanu/68f20cab856a530f2a3fea1af2266f0c to your computer and use it in GitHub Desktop.
<?php
add_filter(
'rest_post_search_query',
function ($args) {
$args['post_type'] = array_diff(
$args['post_type'],
['ct_content_block']
);
return $args;
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment