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

Archive listing pages chronologically but storylines reverse-chronologically #310

Closed pixel-prism closed 6 years ago

pixel-prism commented 6 years ago

For my archive page, I have all the pages listed as thumbnails by storyline, and thankfully all the pages in each storyline are in chronological order!

Unfortunately, the storylines are not in chronological order.

Expected Behavior

I'm looking to get:

Current Behavior

It is currently:

Context

It's not so bad right now with only 3 chapters, but eventually with enough chapters, it's going to be a looooong scroll for new readers to get to Chapter 1.

Example

https://cvilbrandt.naiya.org/archive/

Environment

mgsisk commented 6 years ago

Hey @pixel-prism, apologies for the trouble. This is another Inkblot issue I need to fix, unfortunately. To force the proper sorting, open up /wp-content/themes/inkblot/template/webcomic-archive.php and find this big block of code (lines 26–34):

$webcomic_arguments = array(
    'collection' => get_post_meta(get_the_ID(), 'webcomic_collection', true),
    'webcomics' => get_post_meta(get_the_ID(), 'inkblot_show_webcomics', true),
    'order' => get_post_meta(get_the_ID(), 'inkblot_webcomic_term_order', true),
    'target' => get_post_meta(get_the_ID(), 'inkblot_webcomic_term_target', true),
    'webcomic_order' => get_post_meta(get_the_ID(), 'inkblot_webcomic_order', true),
    'webcomic_image' => get_post_meta(get_the_ID(), 'inkblot_webcomic_image', true),
    'show_image' => get_post_meta(get_the_ID(), 'inkblot_webcomic_term_image', true)
);

and add an orderby argument, like:

$webcomic_arguments = array(
    'collection' => get_post_meta(get_the_ID(), 'webcomic_collection', true),
    'webcomics' => get_post_meta(get_the_ID(), 'inkblot_show_webcomics', true),
    'order' => get_post_meta(get_the_ID(), 'inkblot_webcomic_term_order', true),
    'target' => get_post_meta(get_the_ID(), 'inkblot_webcomic_term_target', true),
    'webcomic_order' => get_post_meta(get_the_ID(), 'inkblot_webcomic_order', true),
    'webcomic_image' => get_post_meta(get_the_ID(), 'inkblot_webcomic_image', true),
    'show_image' => get_post_meta(get_the_ID(), 'inkblot_webcomic_term_image', true),
    'orderby' => 'name'
);
pixel-prism commented 6 years ago

Rad! That worked great! Thanks a million!!