Automattic / Co-Authors-Plus

Multiple bylines and Guest Authors for WordPress
https://wordpress.org/plugins/co-authors-plus/
GNU General Public License v2.0
287 stars 205 forks source link

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

Open reveritas opened 1 month ago

reveritas commented 1 month ago

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 commented 4 weeks ago

Would either of these make sense?