I have two custom post types, authors and books. Each author has a page showing some custom fields: biography, email and phone, with an URL like https://website/author/full-name.
On each author page there is a sidebar showing links to the related books: All books, Most recent books, Most read books.
I would like that clicking on each link the content section “updates” the author page main section, replacing the custom fields above with queries on the Book CPT (showing the books written by each author).
I was thinking of passing values with querystrings (e.g. https://website/author/?books=all), even if being able to create a custom url would be more “elegant”, something like https://website/author/full-name/all-books, and so on.
Any suggestions or links to useful resources ? Thanks