Different types of authors in Wordpress?

你说的曾经没有我的故事 提交于 2019-12-12 19:13:01

问题


I want to make a website about illustrated books. There are two different kind of authors for a book: writers and illustrators

For each writer I want to make a page that lists the books for that writer. The path would be:

  • http://mysite.com/writers/EdgarAllanPoe
  • http://mysite.com/writers/OscarWilde
  • etc

The same for each illustrator: a page for each illustrator listing the books illustrated by her or him. Paths in this case would be:

  • http://mysite.com/illustrators/DiegoRivera
  • http://mysite.com/illustrators/FridaKahlo
  • etc

and then, each book will have a single page (like a post):

  • http://mysite.com/books/OneHundredYearsOfSolitude
  • http://mysite.com/books/WinnieThePooh
  • etc

Is it possible to do this in Wordpress? Thanks.


回答1:


Absolutely, there are definitely ways to do this. The way I'd recommend it is using one custom post type for books and two custom taxonomies for illustrators and authors.

That would give you the url structures you want right out of the box, and would make it easy to associate any book with an author and illustrator (or multiple authors and illustrators, if it's a collaborative book) and would involve only about 30 - 40 lines of code to set it up. There'd be more involved in getting the templating to act the way you wanted, but not much.



来源:https://stackoverflow.com/questions/3435925/different-types-of-authors-in-wordpress

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!