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

Webcomic archive template #243

Closed Mastara closed 6 years ago

Mastara commented 9 years ago

Hello again! Sorry for the novice questions and thanks for the help (also, thanks for the plugin+ theme :D)

I have created a page with the webcomic archive template. 1.Is there a way to change the order of the pages (chronological versus reverse-chronological)? I have found the Appearence-Customize-Webcomic-Archive settings, but they seem to have no effect.

  1. is there a way to display the archive as a row, not as a column?

This is the testing website http://test-webcomics.mereledeaur.ro/?page_id=15 (I am also building "the real" website, and there the archive displays counter-chronological, as opposed to the test website. I have no idea why. They are both stuck like this...)

thanks again!

mgsisk commented 9 years ago

Glad you're liking Webcomic and Inkblot @Mastara! The Customize setting you refer to actually refers to WordPress archive pages (e.g. those pages that show all posts with a certain tag or in a certain category, for example). If you want to change the order of comics when using the Webcomic Archive page template… it looks like I forgot that option. XD

I'm going to create an issue on the Inkblot repository to remind me to add this as a feature (the archive template is actually part of Inkblot), but until I get around to that you can fix this by opening up inkblot/templates/webcomic-archive.php, finding this block (lines 28-32):

                'webcomics' => true,
                'target' => 'first',
                '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),
                'collection' => get_post_meta(get_the_ID(), 'webcomic_collection', true)

and making it look like this:

                'webcomics' => true,
                'target' => 'first',
                '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),
                'collection' => get_post_meta(get_the_ID(), 'webcomic_collection', true),
                'webcomic_order' => 'DESC' // 'ASC' is the default

You'll have to tweak the CSS to get the archive to display as a row. This should get you started (add it to the bottom of style.css):

.webcomic-collections li {float: left; list-style: none;}
Mastara commented 9 years ago

Thank you so much! It did exactly what I wanted.

(Random fact, not sure if it's relevant to anyone. The outdated version of the Intuitive Custom Post Order plugin was somehow messing with the webcomic order on the webcomic archive page and causing all to be displayed descending, regardless of what code I inserted. Updated the plugin, all fine)

faoliveira commented 9 years ago

Leveraging. How to do when the person clicks on the webcomic in Archive page, then go to the collection of that webcomic? Not the last published

mgsisk commented 9 years ago

@faoliveira, if I understand your question you would want to list collections and specify a target argument of archive. The Webcomic Archive template actually looks for a value for the target argument in the inkblot_webcomic_term_target custom field… but I apparently forgot to add an option for that to the template options. To get around this, just add a custom field named inkblot_webcomic_term_target to your page and set it to archive.

phiiiill commented 8 years ago

Hello mgsisk i reallly need your help . i would to display all my webcomic collection in a page throught a template page that i ll create. i really need some code line to put into my template could you please help me to do it ... let me know if i m not clear in what i wrote ... thank you

phiiiill commented 8 years ago

this is the code i tried to do but nothing ( could you please show me the differentes step thank you )

<?php

/**

get_header("bootstrap");

?> <?php get_webcomic_collection ?>

<?php get_footer("bootstrap"); ?>

ykyu commented 8 years ago

@phiiiill Is there a reason you're not using the default webcomics archive template? It sounds like the functionality you're looking for is basically what the default archive template is made for.

get_webcomic_collection() returns the ID or config of a collection; it isn't really applicable for what you're requesting as it doesn't display webcomic items.

phiiiill commented 8 years ago

in fact the Archive template display only one webcomic collection and the differents webcomics inside .. me i want to display all my webcomics collections

phiiiill commented 8 years ago

how could i write this code

ykyu commented 8 years ago

@phiiiill I don't really know why you'd want to display the entire archive of _every _webcomic collection on the same page. It would probably be better to have a page that linked the page for each collection's archive, so that a single page isn't inundated with thumbnails from multiple projects, or to list the archive page for each collection from a sidebar or menu.

If that's what you really want to do though, I recommend using the regular collection archive template as a reference and iterating through the main if (have_posts()) section for a query of each webcomic collection.

phiiiill commented 8 years ago

thank you very much YKYU for your suggestion... i tried that code you recommended me .. but it shows me some errom message ... Fatal error: Call to undefined function inkblot_posts_nav() in /home/makwahlives/goldenbeardproject.com/wp-content/themes/Adviz-themev5-1/page-templates/comics.php on line 64

in reallity i m not using INKBLOT theme ... i m using my own theme .. when used for my widget the [ webcomic] collection, its appeared correctly with the poster of two collections of webcomics that i have created ... thats really what i would like it happen into my page.. but unfortunately there is no widget for page... that is the reason for what i need a code to call it through my template page...

phiiiill commented 8 years ago

i mean to call the last webcomics collection not the webcomics pages inside the webcomics collection for example: WEBCOMIC COLLECTON 1 ( has 20 webcomics pages), WEBCOMIC COLLECTON 2 ( has 10 webcomics pages) and WEBCOMIC COLLECTON 3 ( has 15 webcomics pages). i wanna call through my template the WEBCOMIC COLLECTON 1, 2, 3 with their poster image

someone can help me to find that ... thank you for your help