Here at PublishPress, we focus on helping publishers succeed with WordPress. Many of those publishers spend much time to find and showcase awesome authors for their content.
However, we've regularly heard from publishers who have run into a problem: WordPress authors don't appear in search results. This makes it hard to find content written by specific authors.
In this tutorial, we'll show you how to understand and solve this WordPress search problem.
Understanding WordPress authors and search results
By default, the WordPress search only returns content on your site. It will not search for media files, comments, custom fields, authors, tags, categories, and other items on your site.
Let's see a practical example of what does NOT show in WordPress search results.
In the image below, we have an author called “ABC Writer”.
If we visit a post written by “ABC Writer”, we will see the name of the author, and we are able to click on it. The page that loads will have a URL like this: example.com/author/abcwriter/. If you are using WordPress without permalinks, the URL will look like this: example.com/?author=2
However, the author's name and profile page do not appear in WordPress search results. If you search for “ABC Writer” you won't get any results.
Solving the problem with plugins
One way to include WordPress authors in search results is to use the WP Extended Search plugin. This is far from the only plugin that can do this. Other plugins that can do this include Relevanssi and Better Search.
- Install the WP Extended Search plugin.
- Go to “Extended Search” and then “Search Settings” in your WordPress admin menu.
- Check the box “Search in Author display name”. Click “Save Changes”.
Now when you search for “ABC Writer”, the WordPress search will show any content written by the author. It will not index the author's profile page, and it will not show the author if they haven't written any posts.
Searching for PublishPress Authors
If you're using the PublishPress Authors plugin, you should know that the data for authors is not stored in the same way as the WordPress core. PublishPress Authors stores author details in a taxonomy. So to include authors in your search results, you need a plugin that can search for taxonomies.
A good plugin for searching taxonomies is Relevanssi. This plugin builds on top of the normal WordPress search feature so you don't need to add any extra widgets or search boxes.
- Go to “Settings”, then “Relevanssi”, then “Indexing” in your WordPress admin menu.
- Check the box for “author” in the “Taxonomies” section.
- Click “Save the options” and then “Build the index”.
That's all you need to do. When you use the WordPress search, it will show any content written by authors stored in PublishPress Authors. You can improve the results of the author profile pages using the data in PublishPress Authors.
If you want a variation on this guide, we also explain how to show Tags and Categories in WordPress search results.