Extend WordPress search to include user search

You can’t achieve this easily with WP’s built-in search system. Even if you managed to build a complicated query that pulls data from the user table, it would be incredibly slow.

Search Unleashed had this functionality, but I’m not sure about compatibility with WP 3.2.

I used it in the past as inspiration to add better search functionality on my site. Basically it gathers data on content publishing hooks, which then gets indexed and stored somewhere for faster accessing, for example a custom db table, or in special files if you’re using the Lucene search engine.

If you really want to go the WP way, see this question. You need to join $wpdb->users on post_author.

Leave a Comment