-
Notifications
You must be signed in to change notification settings - Fork 896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
%%name%% snippet variable not outputting the author name when the first post on the author archive page contains coauthor post added via 'Co-Authors Plus' plugin #21871
Comments
Hi @MastaBaba Thanks for using the Yoast SEO plugin and for reporting the issue. We apologize for the trouble you are experiencing with snippet variable %%name%% not outputting as expected when the post is added with the co-authors. I am able to replicate this issue at my end. Workaround a) via the User edit page:
b) Via code using the filter
You can change the Author Archive to something like Author Archive - Your sitename or something you prefer to have. What's next? Please don't hesitate to contact us back if you have further concerns. |
Thanks @josevarghese, The first option isn't very sustainable, as this problem crops up for the majority of our few hundred authors. The second option works. Seems to me like updating YOAST's code on your end would be trivial, no? Thanks again. |
Thanks for the confirmation @MastaBaba ! Yes, this issue has been escalated to the development team. As mentioned, our developers work on the highest-priority issues first. Unfortunately, this means I cannot give you an estimate of when they'll start working on this. Thanks for understanding. |
Internal Slack conversation: https://yoast.slack.com/archives/C01NCRHHN30/p1733130245603449 |
Please give us a description of what happened
I use Co-Authors Plus.
The author archives show an incorrect page title. This, because the %name variable for some reason doesn’t use the name of the author, but uses the list of authors associated with the first article in the archive in question.
So, instead of “Mr. X, Author at My Website”, when the first article in the list was authored by “Mr. X” and “Mr. Y”, the title of the archive for both Mr. X and Mr. Y is “Mr. X, Mr. Y, Author at My Website”.
Removing any value for the “SEO title” for the “Search appearance” of the Author archives reverts to the problem above. Only the %name variable outputs the author name, and, when used, picks up the list of names of the first article in the archive.
In my example, both Mr. X and Mr. Y are users, not guest authors. And the incorrect title is showing in the author archives for both users.
So, the titles of the author archive for the user Mr. X, and the title for the author archive for Mr. Y are both “Mr. X, Mr. Y, Author at My Website””.
In both cases, the author archive is requested, so something like /author/mrx and /author/mry.
Therefore, it’s very clear what author should be named in the title.
Started this bug report here: https://wordpress.org/support/topic/author-archives-not-having-the-correct-title/
To Reproduce
Step-by-step reproduction instructions
Expected results
Actual results
Screenshots, screen recording, code snippet
If possible, please provide a screenshot, a screen recording or a code snippet which demonstrates the bug.
Technical info
Used versions
The text was updated successfully, but these errors were encountered: