Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Archive Unification #168

Closed
ryoB2000 opened this issue Oct 3, 2013 · 8 comments
Closed

Archive Unification #168

ryoB2000 opened this issue Oct 3, 2013 · 8 comments
Assignees

Comments

@ryoB2000
Copy link

ryoB2000 commented Oct 3, 2013

Hello again! Just wanted to say thanks again for this plugin and for all the work you do in helping me in the past and helping everyone in general. That said I have a question. I recently updated something in Inkblot or ComicPress and now the modifications I made for the pages 8 months ago no longer works for the archive pages. It works for the front page http://thunderkidmanga.com/manga/thunderkid-comic/, but the rest of the pages no longer have any of the banner, background, or formatting http://thunderkidmanga.com/manga/thunderkid-comic/thunderkid-comic/chapter-8-page-16/. Is there something I need to add or remove in Archives.php? Thank you very much in advance and I hope you have a great day!

@mgsisk
Copy link
Owner

mgsisk commented Oct 4, 2013

I think you might've been hit by the issue described here (that post also explains how to fix it). Let me know if that works!

@ghost ghost assigned mgsisk Oct 4, 2013
@ryoB2000
Copy link
Author

ryoB2000 commented Oct 4, 2013

Thanks for the reply Mike! I checked on both files and unfortunately it looks as if these were already there as of WebComic Version 4.0.9.1. Though you have confirmed my suspicion that the issue lies somewhere in those files. Thanks very much in advance and have a good one!

@mgsisk
Copy link
Owner

mgsisk commented Oct 9, 2013

Strange; are you absolutely sure you checked the correct files? It wouldn't be in Webcomic; it would be in the Inkblot files wp-content/themes/inkblot/webcomic/archive.php and wp-content/themes/inkblot/webcomic/single.php. If get_header(), get_sidebar(), and get_footer() are already in those files I'm not sure what the problem could be, to be honest.

@mgsisk
Copy link
Owner

mgsisk commented Oct 9, 2013

Assuming the single.php template you posted is correct, it very clearly doesn't have any calls to get_header(), get_sidebar(), or get_footer() in it. Adding them will (most likely) correct the issue; I've pasted the most recent version of webcomic/single.php from Inkblot below:

<?php
/** Single post template.
 * 
 * This template is nearly identical to the normal `single.php`
 * template, except for the addition of webcomic display using the
 * separate `/webcomic/webcomic.php` template.
 * 
 * @package Inkblot
 * @see github.com/mgsisk/webcomic/wiki/Templates
 */

get_header(); ?>

<?php while ( have_posts() ) : the_post(); ?>
    <?php if ( !get_theme_mod( 'webcomic_content' ) ) : ?>
        <div id="webcomic" class="post-webcomic" data-webcomic-shortcuts data-webcomic-gestures>
            <?php get_template_part( 'webcomic/webcomic', get_post_type() ); ?>
        </div><!-- .post-webcomic -->
    <?php endif; ?>
    <main role="main">
        <?php if ( get_theme_mod( 'webcomic_content' ) ) : ?>
            <div id="webcomic" class="post-webcomic" data-webcomic-shortcuts data-webcomic-gestures>
                <?php get_template_part( 'webcomic/webcomic', get_post_type() ); ?>
            </div><!-- .post-webcomic -->
        <?php endif; ?>
        <?php get_template_part( 'webcomic/content', get_post_type() ); ?>
        <?php webcomic_transcripts_template(); ?>
        <?php comments_template( '', true ); ?>
    </main>
<?php endwhile; ?>

<?php get_sidebar(); ?>
<?php get_footer(); ?>

@ryoB2000
Copy link
Author

ryoB2000 commented Oct 9, 2013

Hm. I thought that the version I copied had those tags. But I did make the adjustments and it hasn't updated as yet. I accidentally posted the wrong archive.php file. The one I saw didn't have the tags but I added them.

<?php
/** Generic Webcomic archive template.
 * 
 * Handles Webcomic-related archive page display. You can create
 * collection, storyline, or character-specific archive templates
 * using WordPress' normal template hierarhcy.
 * 
 * @package Inkblot
 * @see codex.wordpress.org/Template_Hierarchy
 */

/** Reverse the order of Webcomic archive pages so older webcomics appear first.
 */
global $wp_query;

query_posts( array_merge( $wp_query->query_vars, array( 'order' => 'ASC' ) ) );
get_header(); ?>

<section id="main" role="main">
    <?php if ( have_posts() ) : ?>
        <header class="page-header">
            <?php if ( is_webcomic_storyline() ) : ?>
                <hgroup>
                    <h1><?php _e( 'Webcomic Storyline Archive', 'inkblot' ) ?></h1>
                    <h2><?php webcomic_storyline_title(); ?></h2>
                </hgroup>
            <?php elseif ( is_webcomic_character() ) : ?>
                <hgroup>
                    <h1><?php _e( 'Webcomic Character Archive', 'inkblot' ) ?></h1>
                    <h2><?php webcomic_character_title(); ?></h2>
                </hgroup>
            <?php else : ?>
                <h1><?php webcomic_collection_title(); ?></h1>
            <?php endif; ?>
        </header><!-- .page-header -->
        <?php if ( is_webcomic_archive() and $image = WebcomicTag::webcomic_collection_image() ) : ?>
            <div class="page-image"><?php echo $image; ?></div><!-- .page-image -->
        <?php elseif ( is_webcomic_storyline() and $image = WebcomicTag::webcomic_term_image() ) : ?>
            <div class="page-image"><?php echo $image; ?></div><!-- .page-image -->
        <?php elseif ( is_webcomic_character() and $image = WebcomicTag::webcomic_term_image() ) : ?>
            <div class="page-image"><?php echo $image; ?></div><!-- .page-image -->
        <?php endif; ?>
        <?php if ( is_webcomic_archive() and $description = WebcomicTag::webcomic_collection_description() ) : ?>
            <div class="page-content"><?php echo $description; ?></div><!-- .page-content -->
        <?php elseif ( is_webcomic_storyline() and $description = WebcomicTag::webcomic_term_description() ) : ?>
            <div class="page-content"><?php echo $description; ?></div><!-- .page-content -->
        <?php elseif ( is_webcomic_character() and $description = WebcomicTag::webcomic_term_description() ) : ?>
            <div class="page-content"><?php echo $description; ?></div><!-- .page-content -->
        <?php endif; ?>
        <?php inkblot_posts_nav( 'above' ); ?>
        <?php while ( have_posts() ) : the_post(); ?>
            <?php get_template_part( 'webcomic/content', get_post_type() ); ?>
        <?php endwhile; ?>
        <?php inkblot_posts_nav( 'below' ); ?>
    <?php else : ?>
        <?php get_template_part( 'content-none', 'archive' ); ?>
    <?php endif; ?>
</section><!-- #main -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>

Is this correct? Thanks again.

@mgsisk
Copy link
Owner

mgsisk commented Oct 9, 2013

That looks correct for inkblot/webcomic/archive.php, but inkblot/webcomic/single.php is the problem.That's the template that displays individual webcomic posts, and the one you posted earlier (which appears to have vanished) did not have those functions in it. Replacing the contents of inkblot/webcomic/single.php with what I posted above should correct the issue.

@ryoB2000
Copy link
Author

ryoB2000 commented Oct 9, 2013

Oh wait, I think I also sent you the wrong single.php too. I hadn't noticed that there were two of them. I made the change that you suggested and it works now! Thanks very much for all your help!

@ryoB2000
Copy link
Author

ryoB2000 commented Oct 9, 2013

I have one more question. The comments don't appear to be showing up for some reason. Which file should I check to address this? Thanks again!

@mgsisk mgsisk added the <=4.x label Sep 22, 2017
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants