The Problem: My personal blog resides at example.com
, and I want to create a bookshelf where I share all the books I read or plan to read. I could do this in two ways:
Create a category called "Books" to display the latest books I added (like archive).
Create a custom taxonomy "Subject" to classify books.
Use custom template files category-books.php and taxonomy-subject.php, and use
in_category( 'books' )
in single.php to customize the look (so that it looks more like a bookshelf).The permalink structure of my blog is already like this:
/%category%/%postname%/
and the category base is stripped. Therefore, the URLs of the Books archive and the book (post) would look like:http://example.com/books/
andhttp://example.com/books/book-name/
, respectively.Use Advanced Custom Fields plugin to display some custom meta boxes conditionally in the edit page, i.e. only when "Books" category is checked.
Create a custom post type called "Books" with
'rewrite' => array('slug' => 'books')
. Therefore, the URLs of the Books archive and the book (post) would look like:http://example.com/books/
andhttp://example.com/books/book-name/
, respectively.Create a custom taxonomy "Subject" to classify books.
Use custom template files archive-books.php, single-books.php, and taxonomy-subject.php to customize the look (so that it looks more like a bookshelf).
Use Advanced Custom Fields plugin to display some custom meta boxes in the edit page for the custom post type - "Books".
Which of the two methods is the better way to accomplish what I am after? (I mean the way it's meant to be done.)
I am still confused as to whether or not custom post types are meant for this purpose; even after reading these: