mgsisk / webcomic

Comic publishing power for the web. Turn your WordPress-powered site into a comic publishing platform with Webcomic.
http://wordpress.org/plugins/webcomic
GNU General Public License v2.0
110 stars 29 forks source link

Categorizing Collections? #284

Closed glancereviver closed 6 years ago

glancereviver commented 7 years ago

I'm styling a webcomic site with a large number of collections. There are over 80 individual comic titles by different artists in this collective.

The owner would like to sort these titles by genre, and make it possible some way to, for example, show all the cover thumbnails for a specific genre. We'd like to avoid updating pages manually every time a new comic is added, so a shortcode that pulls thumbnails up by genre would be ideal.

To complicate matters, we'd like to put comics in more than one genre if possible. So, if for example, something is both "fantasy" and "romance" it would appear on both pages.

Since collections are already categories, I have no idea how to do this. I thought about making the Collections into the different genres, then the individual comics storylines, and child storylines for multiple chapters. But this causes some issues with navigation (moving onto the next comic as if it is part of the same collection isn't the WORST thing that could happen, but it's still not ideal) and it also makes it impossible to categorize one comic under two genres.

Ideas/suggestions appreciated!

mgsisk commented 7 years ago

That's an interesting challenge, @glancereviver.

The bad news is that – as you've noticed – Webcomic and WordPress don't really work that way. Each collection in Webcomic is a custom WordPress post type, and post types are pretty abstract; you can't tag a post type with a genre, or add custom meta data to it like you would a post. Webcomic gets around this by storing custom post type configurations in the plugin settings array. This is a bit clunky, and doesn't really help in your case. To do what you want to do in Webcomic right now, you'd have to add genre info directly to the collection array, and then write a few custom functions to grab collections by certain genres. It's doable, just not ideal. If you'd like to pursue this approach let me know and I can try to work up a basic example.

The good news is that this will – at some point – become a much easier thing to do in a future Webcomic release. I've thought about similar issues before and the answer is pretty straightforward: make every collection a post in a webcomic_collection post type. This solves a lot of issues, including yours, and is the direction that Webcomic is headed. Unfortunately, it's a really big change to how Webcomic currently works. I had originally wanted to do it for the upcoming Webcomic 5 release, but it was just too big of a change to include with everything else that needs to be done. This change is very high on my list of things to do for Webcomic, though; it'll probably be the next thing I work on after v5 is out.

glancereviver commented 7 years ago

Thanks for the information! Just knowing that it's not really a thing that just "works" in itself is helpful so that I don't waste time trying to find something that does not yet exist, haha.

If you can show me a basic example, then I can see if it's something I understand how to implement. If not, I can ask and see if there's anyone else on our team who can do it. Or we can find somebody! In any case, an example would help us out a lot if it's not too much trouble for you, and I appreciate the help.