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

Integrate with or overwrite Yoast's structured author data #305

Closed
james-tyner opened this issue Apr 10, 2024 · 3 comments
Closed

Integrate with or overwrite Yoast's structured author data #305

james-tyner opened this issue Apr 10, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request php Requires understanding PHP

Comments

@james-tyner
Copy link

james-tyner commented Apr 10, 2024

Description

The Yoast SEO plugin adds structured data in the <head> of the post frontend to expose metadata about the post to scrapers like Googlebot. More details on Yoast's structured data features are here: https://yoast.com/features/structured-data/

When Byline Manager is active, it does not overwrite Yoast's structured data. So while the visible frontend of the site uses data from Byline Manager's profiles, the metadata of the posts use WordPress author data retrieved by Yoast. This is an unexpected behavior for editorial users and may result in negative consequences like inaccurate information appearing on third-party platforms.

Some existing Alley-developed sites (at least our own @sfstandard 😉) add hooks to overwrite some of the metadata for Yoast, but this solution is fragile. Post fields may be added or changed, new post types may be created, or Yoast may change how it handles structured data.

Since Yoast is so popular, I think it makes sense for Byline Manager to incorporate some logic to handle this situation, potentially some implementation of the ideas raised in #14.

Some additional considerations:

  • How can this be easily extended to incorporate custom post meta fields?
  • What should happen for custom post types? How can this be easily extended to custom post types?

Use Case

Structured data for post authors is desirable in nearly all situations because it helps web indexing engines like Googlebot understand the content better. This improvement would ensure that the data provided is accurate.

@james-tyner james-tyner added the enhancement New feature or request label Apr 10, 2024
@kevinfodness kevinfodness added the php Requires understanding PHP label Apr 17, 2024
@dlh01 dlh01 self-assigned this May 26, 2024
@dlh01
Copy link
Member

dlh01 commented May 28, 2024

Hey @james-tyner — thanks for filing this feature request! I think it makes sense.

Some questions for you about two points you raised:

How can this be easily extended to incorporate custom post meta fields?

Can you give an example of an integration between a custom meta field and Yoast that the plugin should facilitate?

What should happen for custom post types? How can this be easily extended to custom post types?

Can you give an example of when the default integration with Yoast (presumably the one applied to the post post type) would not be appropriate to also apply by default to other post types? How can the plugin best support these use cases as part of its Yoast integration?

In the meantime, I've opened #344 to provide three initial points of integration. Your feedback is welcome!

dlh01 added a commit that referenced this issue May 29, 2024
…tegration

Improve default integration with Yoast SEO
@dlh01
Copy link
Member

dlh01 commented May 29, 2024

I'm going to merge #344, but I'll leave this issue open so that can discussion can continue. Thanks again!

alley-ci pushed a commit that referenced this issue May 29, 2024
…tegration

Improve default integration with Yoast SEO
@james-tyner
Copy link
Author

@dlh01 thank you for addressing this!

I'll answer the custom post type question first. I think what I meant in writing the issue was: whatever solution we create for this issue should apply in any post types where byline profiles are being used as authors, allowing us to avoid the additional work of recreating the structured data logic for each new post type that's created. At the time of writing this ticket, we were faced with having to separately recreate a solution to this problem for each new post types we were adding.

I just looked back through my Slack history to try to figure out what I was getting at with the meta fields question when I wrote this issue, and I honestly don't know. 🤷‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request php Requires understanding PHP
Projects
None yet
Development

No branches or pull requests

3 participants