WordPress Developer Ukraine, Kyiv
Limit WordPress search to specific post types

Limit WordPress search to specific post types

By default WordPress includes all public post types in search results — posts, pages, and any registered custom post types. On a standard blog that is usually acceptable, but on a more complex site it quickly becomes a problem. Imagine a site that has regular posts, documentation pages, a portfolio section, team member profiles, and…
Search WordPress by Custom Fields Without a Plugin

Search WordPress by Custom Fields Without a Plugin

By default, the WordPress search queries only the post_title and post_content columns in the wp_posts table. If you store important data in custom fields (post meta), those values are invisible to the search engine unless you extend it. Fortunately, three WordPress filters give you exactly the hooks you need — no plugin required.