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

Override "Co-Authors" blocks to only render primary author #1051

Open
reveritas opened this issue Jun 2, 2024 · 1 comment
Open

Override "Co-Authors" blocks to only render primary author #1051

reveritas opened this issue Jun 2, 2024 · 1 comment

Comments

@reveritas
Copy link

This isn't really an "issue" so much as it is a question, but I didn't know where else to post this.

I would like to use the "Co-Authors" block to display author information under a post - but not for all co-authors, only for the primary author, i.e. the first one. I don't know which functions I need to hook filters or actions in to change the result from all co-authors to only one. I could directly change the render_block() functions of the blocks or the Blocks::get_authors_with_api_schema() function which gets the author data. But then my changes will be overridden with the next update, so I would like to do it with an external override.

I'm new to WP so if there is an obvious answer for how to find out which functions can be hooked into, please let me know.

@douglas-johnson
Copy link
Contributor

Would either of these make sense?

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

No branches or pull requests

2 participants