• Resolved KS

    (@karl19)


    While working on the search results layout, I noticed that standard WP search doesn’t seem to show authors and I can’t find much information about how to extend this. There are plugins like Relevanssi, but the author search is a pro feature.

    Came across this plugin, which looks promising. But even if I tick “Search in Author display name”, no author profiles show up in the results. The search term tested is part of author display name.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Sumit Singh

    (@5um17)

    Hi,

    If you select “Search in Author display name” then it will brings posts by that author not the author profile.
    For example:- If someone searches for John Doe then posts by John Doe will be displayed in search results.

    What you are asking is not possible in WordPress. There is not author profile link in WordPress only author archive page.

    I hope it helps!

    Thanks

    Thread Starter KS

    (@karl19)

    Hi Sumit, many thanks for the reply!

    What I’m thinking of are the standard WordPress author pages, eg https://example.com/author/john-doe/ What I would have imagined if I search for “John Doe” with “Search in Author display name”, is that one of the search results would be the link to their author page.

    It seems that some search plugins do this, but generally it seems to be a pro feature.

    Plugin Author Sumit Singh

    (@5um17)

    Hi KS,

    Okay, I get it what you mean.
    I think this is custom work, because by default WP does not result the link to archive pages.

    I would suggest posting this to general WP forums, I can give you the idea how this can be done.
    – We can use WP user query to search the author based on search query term. https://developer.www.ads-software.com/reference/classes/wp_user_query/#search-parameters
    – Then place the author link below the search results with author name or maybe a photo using template hooks.

    I wish I could help you to write the code but I am little busy at the moment.

    I hope it helps.

    Thread Starter KS

    (@karl19)

    Hi Sumit, sorry I didn’t get around to replying to your message until now – many thanks for the suggestions!

    If I understand you correctly, I think we’re still talking about different things.. with your suggestion, one would add the author link under a search result related to that author (for example a post)? What I’m trying to get, is that author pages show up as a unique search result on their own.

    SEARCH RESULTS:

    1. POST
    2. POST
    3. PAGE
    4. AUTHOR PAGE
    5. CUSTOM POST TYPE
    6. POST
    7. AUTHOR PAGE
    8. PAGE
    9. POST
    10. CUSTOM POST TYPE

    I guess that would require a lot of additional coding, I’ll keep on looking. Many thanks for your input though!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘No authors in result’ is closed to new replies.