Skip to content

Instantly share code, notes, and snippets.

@mikeschinkel
Created June 7, 2012 00:39
Show Gist options
  • Save mikeschinkel/2885760 to your computer and use it in GitHub Desktop.
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
@Frumph
Copy link

Frumph commented Jun 7, 2012

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.

@Frumph
Copy link

Frumph commented Jun 7, 2012

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..

@mikeschinkel
Copy link
Author

  • 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 and get_year and where exactly are you calling them?

@Frumph
Copy link

Frumph commented Jun 7, 2012

  1. There are not always books, some people might not even care to use anything more then a single chapter.
  2. There must always be a chapter, there's doesn't have to be a book. If it does exist, cool.
  3. &comic=post_slug/comic_slug_of_the_post_tiitle, sure.
  4. comic-calendar.php - in the widgets directory, is a rewrite of the get_calendar using the post type comic in it's query.

@mikeschinkel
Copy link
Author

mikeschinkel commented Jun 12, 2012 via email

@Frumph
Copy link

Frumph commented Jun 12, 2012 via email

@Frumph
Copy link

Frumph commented Jul 2, 2012

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

@mikeschinkel
Copy link
Author

mikeschinkel commented Aug 6, 2012 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment