Jump to content
Sign in to follow this  
appappnost

Archive Template for Webcomic

Recommended Posts

appappnost

I am trying to build an archive template for a webcomic - which is using the Webcomic plugin ... I had been using the theme (Inkblot) for the plugin - but - just made the switch over to Platformpro. Any help would be greatly appreciated. I made a new php file - using the following code - and it showed up in my dropdown under the name "Comic Page" ... Just fine.

<?php
	if(VPRO) {
	/*
		Template Name: Comic Page
	*/
	
	setup_pagelines_template();
	
	}
Now, here is where it gets tricky ... I went into the code for the Comic Archive Page for Inkblot and added it into my Platformpro page - and it gave me a fatal error ... I tried various parts of the code - but nothing wanted to work ... I've also researched it at the Webcomic forum - but figured that I would ask over here as well ... Inkblot Archive Code:
<?php
	/**
	 * Template Name: Webcomic Archive
	 */
	
	the_post(); get_header(); global $inkblot; $post_meta = current( get_post_meta( $post->ID, 'inkblot' ) );
	?>
	
	<div id="main">
		<?php if ( '3c3' == $inkblot->option( 'layout' ) ) get_sidebar(); ?>
		<section id="content">
			<div>
				<div id="content-above" class="widgetized"><?php dynamic_sidebar( 'inkblot-content-above' ); ?></div>
				<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
					<h1><?php the_title(); ?></h1>
					<div class="content"><?php the_content(); wp_link_pages( array( 'before' => '<nav class="paginated">', 'after' => '</nav>' ) ); edit_post_link( __( 'Edit', 'inkblot' ), '<p>', '</p>' ); ?></div>
					<?php
						$format     = ( 'month' == $post_meta[ 'webcomic_group' ] ) ? 'grid' : 'olist';
						$image      = ( !empty( $post_meta[ 'webcomic_image' ] ) ) ? 'ℑ=' . $post_meta[ 'webcomic_image' ] : '';
						$collection = ( !empty( $post_meta[ 'webcomic_collection' ] ) ) ? '&term_group=' . $post_meta[ 'webcomic_collection' ] : '';
	
						webcomic_archive( 'last_only=1&group=' . $post_meta[ 'webcomic_group' ] . '&format=' . $format . $image . $collection );
						comments_template( '', true );
					?>
				</article><!-- #post-<?php the_ID(); ?> -->
				<div id="content-below" class="widgetized"><?php dynamic_sidebar( 'inkblot-content-below' ); ?></div>
			</div>
		</section><!--#content-->
	</div><!--#main-->
	
	<?php get_sidebar(); get_footer(); ?>

Share this post


Link to post
Share on other sites
cmunns

Are you using the Base child theme? There are examples in that folder on how to add new section/pages/etc...start there and see how far you get.

Share this post


Link to post
Share on other sites
appappnost

I sure am ... I'll give that a shot ... Thanks!

Share this post


Link to post
Share on other sites
cmunns

You could also just use WordPress conditionals and add the code directly to the template.postloop.php file (of course after you copy the file to Base so it's editable )

Share this post


Link to post
Share on other sites
appappnost

I may be in over my head with this stuff ... but - I'm going to give it a try ... I'll let you know when I have thoroughly broken it! Thanks.

Share this post


Link to post
Share on other sites
appappnost

So - I made a new template page and added this code (that I got from the plugin's developer)

webcomic_archive();
and - it added an unstyled list of links ... which is cool - because something showed up ... the only problem is that the list showed up in the footer ... any idea how to get it to show up in the content area? Here is the full code for my template:
<?php
	if(VPRO) {
	/*
		Template Name: Comic Page
	*/
	
	setup_pagelines_template();
	webcomic_archive();
	}

Share this post


Link to post
Share on other sites
cmunns

I would add it to the main template.postloop.php file via a conditional. for example if you have a page titled comics you could use this ` if(is_page('comics'): webcomic_archive(); endif; `

Share this post


Link to post
Share on other sites
appappnost

Just so that everyone knows - - - through working with your suggestions and some magic from the Webcomic plugin developer - - - I was able to get everything working using some options in the plugin's php file. Thanks for all of your help!

Share this post


Link to post
Share on other sites
appappnost
So - I just installed Platform 2 - and this all went away ... (mostly because I forgot about the code edits that I had made ...) My question is - where would I add the conditional statement if(is_page('categorycomic'): webcomic_archive(); endif; As there no longer seems to be a main template.postloop.php file where I can add it. Thanks!

Share this post


Link to post
Share on other sites
Rob
I'll bump this to a developer, but please be patient. He's got the flu.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×