DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk4 min

How to Search WordPress Posts by Author: Filters and Keyword Search

WordPress can filter listings by author natively, but author-name keyword search needs author indexing or custom search configuration. Choose the right method for user accounts, co-authors, and guest authors.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

WordPress can show posts by a selected author with a native query, but its standard keyword search does not automatically match author names. Choose the right method for the task: use an author-filtered listing when visitors need to browse one writer’s posts, or add author data to the search index when an author’s name should work as a search term.

Choose between an author-filtered listing and keyword search

These are separate features. An author-filtered listing narrows posts to a selected writer; a visitor might reach it from an author page, filter, or link. Standard WordPress keyword search, by contrast, searches post title, excerpt, and content according to FacetWP’s search documentation. To make a writer’s name return matching posts in general search, the search system must also index author details or be customized to match them.

As an Amazon Associate I earn from qualifying purchases.

  • Use a listing filter when the user selects or visits a particular author.
  • Use author-aware keyword search when typing an author name into the site’s search box should return that writer’s posts.

Filter a WordPress listing by author

For a developer-managed listing, WordPress’s WP_Query API provides author query arguments. Use the author’s WordPress user ID for a single-author query:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
$query = new WP_Query( array( 'author' => 123 ) );

Replace 123 with the intended user ID. To query by a user’s nicename instead, use author_name:

$query = new WP_Query( array( 'author_name' => 'rami' ) );

The value for author_name must be the user’s user_nicename, not the display name shown on the site. For multiple WordPress user accounts, the API also supports author__in with an array of user IDs. These arguments filter a query; they do not make author names searchable through the ordinary keyword search box.

Make author names match keyword searches

To return a post when someone searches for its author’s name, the search implementation needs to include author information. One route is custom development: WordPress search behavior can be adjusted through hooks such as posts_search. If the site uses FacetWP’s Search facet with its WP Default engine, its documentation describes the facetwp_search_query_args hook for modifying query arguments. These hooks are starting points for site-specific work, not turnkey author indexing; test the implementation against the site’s search setup and any other search customizations.

Another route is a search product with author indexing. SearchWP describes an integration that can index author details including display name, first name, last name, and bio so they can be used in article search. This is a vendor-described paid-product capability, not an independent performance assessment. Check SearchWP’s current integration and plan details before choosing it: the cited feature page does not establish current pricing or which plan includes the integration. See SearchWP’s author search information.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Account for co-authors and guest authors

A user-ID filter may not cover every author model. FacetWP’s Co-Authors Plus guidance explains that the plugin represents authors as terms in a custom author taxonomy. A taxonomy query can therefore cover regular users, co-authors, and guest authors; a query based only on a WordPress user ID does not work for guest authors.

There is also an AJAX-specific consideration. FacetWP notes that the native author_name query variable may not be available while an AJAX listing is being filtered. Its examples retrieve author context from the request URI instead. If an author filter works on initial page load but fails after AJAX updates, check how the author context is passed into the request and whether the listing is querying the Co-Authors Plus taxonomy.

Pick the implementation that fits the site

Reader need Author setup Suitable approach Key consideration
Show posts by a selected writer One WordPress user WP_Query with author (user ID) or author_name (user nicename) Creates a filtered listing; it does not change keyword search.
Show posts from several WordPress users Multiple user accounts WP_Query with author__in (array of IDs) Works with user IDs, not guest-author records.
Search general site content by author name Author details must be indexed Custom search hooks or a search product that indexes author fields Custom code is site-specific; verify a product’s current features and plan requirements.
Filter co-authored or guest-authored posts Co-Authors Plus records Query its custom author taxonomy For FacetWP AJAX filtering, author context may need to come from the request URI.

Test the result before publishing the search experience

  • For a listing filter, confirm that the intended author’s posts appear and that another author’s posts do not.
  • For keyword search, try an author’s display name and, if intended, first and last name separately. Confirm that matching posts appear alongside ordinary content matches.
  • For co-authors or guest authors, test posts attributed to each author type rather than assuming user-ID queries include them.
  • For AJAX facets, test both the initial page and a refreshed result set so a missing author context does not silently broaden or empty the listing.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.