-
-
Save mikeschinkel/2885760 to your computer and use it in GitHub Desktop.
/comic/{$chapter_slug}/{$post_slug}/ -> display a post whose parent is a chapter | |
/feed/ -> displays 'post' and 'comic' | |
/comic/feed/ -> displays 'comic' | |
/comic/{$chapter_slug}/feed/ -> displays all comic posts for a chapter? | |
/comic/{$year}/ -> displays all comic posts for that year | |
/comic/{$year}/{$month}/ -> displays all comic posts for that year/month | |
/comic/{$year}/{$month}/{$day}/ -> displays all comic posts for that year/month/day | |
{$chapter_slug} = hierarchical taxonomy
One of the issues I have is the comic-calendar.php (widget) which is rewritten to handle the post type links back as /year/mo/day/?post_type=comic in that order get_month doesn't return post type
Not a URL question, but are chapters nothing more than a name and a slug? Would it be useful to have addition information about them? IOW, would there be any benefit to having them be a custom post type that would be a parent to a comic?
Also, did you know that ?post_type=comic
in the URL is the same as $query_var['post_type'] = 'comic'
in the 'request' hook (see here: https://gist.github.com/2885558)
I don't understand "rewritten to handle the post type links back as /year/mo/day/?post_type=comic in that order get_month doesn't return post type"
Why is {$chapter_slug}
a hierarchical taxonomy? Can you have chapters within chapters?
Comics navigate by chapters, not by date, as if they were categories.
The relation isn't parent -> child, it's more 'in chapter'
neg, single chapter per comic.
If you look at http://dev.frumph.net/ and the gist for comic-calendar.php
the rewritten calendar for month for the post type appends the ?post_type=comic
to the end instead of adding it to the beginning of the url because the functions for get_month get_year etc do not associate the post type appropriately.
oh yeah, you can have chapter's within chapter, basically like a story
Book 1
--- Chapter 1
--- Chapter 2 .. 15
Book 2
--- Chapter 1
--- Chapter 2
etc..
- Are there always Books? Can Chapters be in more than one Book?
- Why are the URLs not
/{$book_slug}/{$chapter_slug}/{$post_slug?}
(or with taxonomy, I guess they are?) - Is
$post_slug
more appropriately named$comic_slug
? - What are the exact functions you are using for functions for
get_month
andget_year
and where exactly are you calling them?
- There are not always books, some people might not even care to use anything more then a single chapter.
- There must always be a chapter, there's doesn't have to be a book. If it does exist, cool.
- &comic=post_slug/comic_slug_of_the_post_tiitle, sure.
- comic-calendar.php - in the widgets directory, is a rewrite of the get_calendar using the post type comic in it's query.
https://github.com/Frumph/comic-easel/blob/master/comiceasel.php#L369
I got the calendar portion to urlrewrite .. now just looking for a way to make it so that the url line itself can be used and stay that way like http://comiceasel.com/comic/2012/06/29/some-comic-name-slug/ where the url line writes out that way as a pretty permalink
/feed/ -> displays 'post' and 'comic'
/comic/feed/ -> displays just 'comic' post type feed