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

If first post on an author archive has multiple authors, the archive's heading displays both authors' bios. #1539

Open
benlk opened this issue Sep 21, 2018 · 6 comments

Comments

@benlk
Copy link
Collaborator

benlk commented Sep 21, 2018

Seen at https://ctmirror.org/author/jkara/ with post https://ctmirror.org/2018/09/18/ct-hospitals-collect-1-2b-outpatient-facility-fees-three-years/:

screen shot 2018-09-21 at 12 21 37 am

@benlk benlk added this to the 0.6 - Performance & SEO milestone Sep 21, 2018
@fenriz07
Copy link

fenriz07 commented Oct 3, 2018

Should I show only 1 author? Is it the owner of the author's page? I would like to help you with this, but I would need a copy of that site to have a real environment, if possible.

@benlk
Copy link
Collaborator Author

benlk commented Oct 3, 2018

The author that should be displayed in this area is the author for the archive page.

I can't give you a copy of that site's database, but you could replicate the issue by:

  1. installing the Co-Authors Plus plugin
  2. Creating a Co-Authors Guest Author, with bio in the user profile
  3. Creating a WordPress User, with bio in the user profile
  4. Creating a post as the WordPress User, and choosing as Co-Authors on the post both the WordPress User and the Guest Author
  5. Visiting the WordPress User's author archive.

@fenriz07
Copy link

fenriz07 commented Oct 3, 2018

captura de pantalla de 2018-10-03 16-08-33

As you can see in the image, I think I have replicated the problem.

user: long
co-author: "Co author"

Now you want that in each post only the name of the main author comes out? in this case "long" and do not leave the invited authors, only the owner of the publication?

@fenriz07
Copy link

fenriz07 commented Oct 3, 2018

The result would be the following:

captura de pantalla de 2018-10-03 16-21-21

fenriz07 added a commit to fenriz07/largo that referenced this issue Oct 7, 2018
@fenriz07
Copy link

fenriz07 commented Oct 7, 2018

Commit!

@benlk
Copy link
Collaborator Author

benlk commented Oct 8, 2018

2fcd2a1 prevents the additional author from being output in each story's byline, which does not address this issue.

I admit that I didn't describe this issue as fully as could have been done. The problem is that there are two authors' biographical information being output at the top of the post archive by the Largo Author Widget's code, when there should only be one because this is a single-author archive.

The archive template calls the Largo Author Widget:

https:/INN/largo/blob/72cc8433a1be1de4f22789e1ec89496d54a653d9/archive.php#L97-L99

Which in turn loops over the list of authors in the current post in The Loop.

https:/INN/largo/blob/025169a6b2ba90da97093b3005cbbadf40667291/inc/widgets/largo-author-bio.php#L61-L74

Because the current post in the Loop may have more than one author, in situations where the current post in the Loop has more than one author, the widget outputs both authors' bio instead of outputting only the bio for the author whose archive page is being viewed.

It should output only the bio for the author whose archive page is being viewed.

benlk added a commit that referenced this issue Nov 6, 2018
This reverts commit 2fcd2a1.

Per #1541 (comment), this fix should not be merged into Largo with the HTTP->HTTPS updates.
@benlk benlk modified the milestones: 0.6.1 - Bugfixes, 0.6.2 Dec 7, 2018
@benlk benlk modified the milestones: 0.6.2, 0.6.3 Dec 19, 2018
@benlk benlk removed this from the 0.6.4 milestone Apr 26, 2019
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

2 participants