Skip to content
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

Filters for the_author() and the_author_posts_link() do not work #208

Open
jonatansteller opened this issue Jul 11, 2014 · 0 comments
Open

Comments

@jonatansteller
Copy link

https://github.com/Automattic/Co-Authors-Plus/blob/3.1.1/php/class-coauthors-template-filters.php#L10

The plugin filters the_author() to use coauthors() instead, and likewise for the_author_posts_link() and coauthors_posts_links(). Now, when I rely on the filter and just use either of the author functions in a theme, the user who put the post online is being displayed instead of the co-authors. When I put the two coauthor equivalents in the theme directly, however, everything works as intended. Hence I assume that the filters might be broken.

I stumbled across this with one of my own themes and when I tried to make the Jetpack mobile theme compatible to Co-Authors Plus as per Automattic/jetpack#825. I have used the same database for testing both themes, though, so I am not sure others are experiencing the same issue.

I originally assumed the issue was related to both filters turning off echo in their equivalent coauthor functions, but changing that bit did not help. There is one instance when the filter does seem to be working: when get_the_author() is called from within the loop but outside of specific posts, like in the heading for author pages in the Jetpack mobile theme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants