Include results from certain categories (or terms) only
Advanced options -> Exclude results panel
- Go to the Advanced options -> Exclude results panel and scroll down until the
- Choose a taxonomy and the terms will load. Select the ones you need by dragging them to the left side of the box.
- Save the options, done
Hiding posts (or any CPT) with no categories or terms
By default, selected post type objects which are not associated with any terms will appear in the results list.
If you whish to exclude them as well, then trun OFF the
Show posts/CPM with empty taxonomy terms? option on the
Frontend Search Settings -> Advanced panel: