Wordpress中不同类型的作者? [英] Different types of authors in Wordpress?

查看:115
本文介绍了Wordpress中不同类型的作者?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想建立一个有关插图书籍的网站.一本书有两种作家:作家和插画家

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

是否可以在Wordpress中执行此操作?谢谢.

Is it possible to do this in Wordpress? Thanks.

推荐答案

当然,肯定有方法可以做到这一点.我建议的方式是对书籍使用一种自定义帖子类型,对插画家和作者使用两种自定义分类法.

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.

这将为您提供您想要的即开即用的url结构,并使将任何书与作者和插图画家(或多位作者和插图画家,如果是一本协作书)相关联变得容易,并且仅涉及设置30至40行代码.使模板以您想要的方式发挥作用会涉及更多,但不多.

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.

这篇关于Wordpress中不同类型的作者?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆