Co-Authors Plus is a neat plugin that makes it possible to have multiple authors for one post in WordPress. This is a useful feature WordPress doesn’t yet support.
Relevanssi only picks up the first author from the post, but making Relevanssi find the other authors as well is very simple, thanks to good design choices made by the Co-authors Plus developers. The plugin stores the extra authors in a custom taxonomy. Indexing custom taxonomies is elementary for Relevanssi.
In order to make Relevanssi index all authors for posts, simply add “author” to the “Choose taxonomies to index” option and re-index.
29 comments Co-authors Plus
Thank you for this tip – just enabled Co-authors the other day and noticed author’s weren’t being indexed!
After indexing the site – I noticed that author’s show up if I search by the full name, is there any trick to having an author’s posts show up if a partial name is searched. An issue I am seeing is if I search by first name only or both names (without quotes) around them then the author’s posts are not retrieved.
Have you enabled the fuzzy search?
I had it set to the default for fuzzy – I have set it to use it for all searches now and that did the trick. I ended up re-indexing for some other settings that I enabled, but just curious if I need to re-index after this change?
Thanks again for the help and a great plugin!
No need to reindex after that, the index remains the same.
Hi, where is “Custom taxonomies to index” option?
It should actually be “Choose taxonomies to index”. “Custom taxonomies to index” is a different option, only available in Relevanssi Premium, but it’s not what is needed here.
ok, thanks, i tried but the problem remains. I have co-authors installed, and search and filter too, and relevanssi, and the problem is that the search and filter detect a co-author only if it’s for first, otherwise a post with coauthor put for second is not indexed
If indexing “author” taxonomy doesn’t help then sorry, I don’t know what’s the problem. Have you tried it without Search & Filter to see if the problem is with S&F?
the problem is with S&F and with a simple list of authors called via php. While if i look for author page all the articles appears, so in author list inside backoffice the posts are counted correctly
I’m not quite sure what this has to do with Relevanssi, then. If you do a simple search – without S&F involved – with an author name, does Relevanssi find a post where that author is a co-author?
if i do a search the coauthor that appears for second does not appear at all associated to a post, that is listed only under the author appearing as first. It appears only in atuhor archive and in backoffice author list.
Can I see your site?
yes, http://www.ateatro.it, by now i’m just reindexing all the voices with relevanssi, in a few minute i think it has done anyway
you can try with ‘giulia alonzo’, to see what i mean, if you click on the name you see the archives, and there the count is right, if you make a search no way to find all her articles, in which she is a coauthor
Do these results look better to you? http://www.ateatro.it/webzine/?s=giulia+alonzo That’s what Relevanssi produces.
there are some articles, in which she is a coauthor, missing http://www.ateatro.it/webzine/author/giuliaalonzo/
this one for example http://www.ateatro.it/webzine/2016/03/06/duettocritico2015-il-premio-scenario-festival-e-nuovi-talenti/
There it is: http://www.ateatro.it/webzine/?s=giulia+alonzo+itfestival
I’m guessing your “Limit searches” setting is too low. It should be at least 300-400.
by now it’s 500, should i tri with a bigger number?
Try disabling it altogether.
i tried but no success…
Sorry, can’t help you more with this.
ok thanks, is there any chance to get an help if buy the premium versions or it’s useless the same?
With Premium support I can take a closer look, but given the Search & Filter involved, it gets a bit complicated, as it seems the Search & Filter search doesn’t provide Relevanssi results at all, and that’s beyond Relevanssi support.
ok, i tried to ask them too in fact, really thanks by now
Hello Mikko. I am using the Relevannsi plugin with Co Authors Plus and have noticed an issue with the search result URL link. When searching for a Co Author (post type of ‘guest-author’), the search result does show up, although the URL looks something like this: http://DOMAIN.COM/?post_type=guest-author&p=1924
The correct Co Authors Plus link looks like this: http://DOMAIN.COM/author/joe-bloggs
I look forward to your reply if you have any ideas.
Steven, it’s the theme that prints out the links, Relevanssi doesn’t usually have anything to do with it. Most themes use
get_permalink()to print out the link.
You should probably include a filter that hooks into those functions and makes sure the link is correct. Look at
the_permalinkfilter hook. For
get_permalink(), the filter you’re looking for is probably
Thank you for the quick reply Mikko. I solved the issue by adding a check on the Search Results page. Basically the following:
IF POST_TYPE IS GUEST-AUTHOR
<a href="ID, $coauthor->user_nicename ); ?>”>display_name; ?>