more page cleanup
This commit is contained in:
parent
dc62559476
commit
a5ebb8f000
|
@ -1,2 +1,3 @@
|
|||
*~
|
||||
.directory
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ class ComicPressAddonCore extends ComicPressAddon {
|
|||
'none' => __('Not a comic', 'comicpress'),
|
||||
'comic' => __('Comic', 'comicpress'),
|
||||
'rss' => __('RSS', 'comicpress'),
|
||||
'archive' => __('Archive', 'comicpress'),
|
||||
'archive' => __('Archive', 'comicpress')
|
||||
);
|
||||
|
||||
$current_type = get_post_meta($post->ID, 'comic_image_type', true);
|
||||
|
|
|
@ -4,12 +4,12 @@ Template Name: Comic Calendar Archive
|
|||
*/
|
||||
|
||||
global $comicpress;
|
||||
|
||||
$comicpress->additional_stylesheets[] = '/style/archive-comic-calendar.css';
|
||||
?>
|
||||
|
||||
<?php get_header() ?>
|
||||
|
||||
<link rel="stylesheet" href="<?php echo get_template_directory_uri() . '/style/archive-comic-calendar.css' ?>" type="text/css" />
|
||||
|
||||
<?php
|
||||
|
||||
$dayWidth = 22; //set to .cpcal-day total width in pixels including: width, left & right border, left & right margin, left & right padding
|
||||
|
|
|
@ -2,56 +2,49 @@
|
|||
/*
|
||||
Template Name: Comic Archive
|
||||
*/
|
||||
|
||||
global $comicpress;
|
||||
|
||||
$comicpress->additional_stylesheets[] = '/style/archive-comic-calendar.css';
|
||||
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<?php get_header() ?>
|
||||
|
||||
<style>
|
||||
.archive-date {
|
||||
padding: 0 5px 0 0;
|
||||
font-size: 11px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.archive-title {
|
||||
padding: 2px 5px;
|
||||
line-height: 11px;
|
||||
border-left: 1px solid #000;
|
||||
}
|
||||
.month-table{
|
||||
border-collapse: collapse;
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="content" class="narrowcolumn">
|
||||
<div class="post-page-head"></div>
|
||||
<div class="post-page">
|
||||
<h2 class="pagetitle"><?php the_title() ?></h2>
|
||||
<div class="entry">
|
||||
<?php while (have_posts()) { the_post(); the_content(); } ?>
|
||||
</div>
|
||||
|
||||
<div class="post-page-head"></div>
|
||||
<div class="post-page">
|
||||
<h2 class="pagetitle"><?php the_title() ?></h2>
|
||||
<div class="entry">
|
||||
<?php while (have_posts()) : the_post(); the_content(); endwhile; ?>
|
||||
</div>
|
||||
|
||||
|
||||
<?php $years = $wpdb->get_col("SELECT DISTINCT YEAR(post_date) FROM $wpdb->posts WHERE post_status = 'publish' ORDER BY post_date DESC");
|
||||
foreach ( $years as $year ) {
|
||||
if ($year != (0) ) { ?>
|
||||
<h3><?php echo $year ?></h3>
|
||||
<table class="month-table">
|
||||
<?php $comicArchive = new WP_Query(); $comicArchive->query('showposts=10000&cat='.get_all_comic_categories_as_cat_string().'&year='.$year);
|
||||
while ($comicArchive->have_posts()) : $comicArchive->the_post() ?>
|
||||
<tr><td class="archive-date"><?php the_time('M j') ?></td><td class="archive-title"><a href="<?php echo get_permalink($post->ID) ?>" rel="bookmark" title="Permanent Link: <?php the_title() ?>"><?php the_title() ?></a></td></tr>
|
||||
<?php endwhile; ?>
|
||||
</table>
|
||||
<?php } } ?>
|
||||
|
||||
<br class="clear-margins" />
|
||||
|
||||
</div>
|
||||
<div class="post-page-foot"></div>
|
||||
<?php
|
||||
$years = $wpdb->get_col("SELECT DISTINCT YEAR(post_date) FROM $wpdb->posts WHERE post_status = 'publish' ORDER BY post_date DESC");
|
||||
foreach ( $years as $year ) {
|
||||
if (!empty($year)) { ?>
|
||||
<h3><?php echo $year ?></h3>
|
||||
<table class="month-table">
|
||||
<?php
|
||||
$comic_archive = new WP_Query();
|
||||
$comic_archive->query('showposts=10000&cat=' . $comicpress->get_all_comic_categories_as_cat_string() . '&year='.$year);
|
||||
while ($comic_archive->have_posts()) {
|
||||
$comic_archive->the_post(); ?>
|
||||
<tr>
|
||||
<td class="archive-date"><?php the_time('M j') ?></td>
|
||||
<td class="archive-title"><a href="<?php echo get_permalink($post->ID) ?>" rel="bookmark" title="Permanent Link: <?php the_title() ?>"><?php the_title() ?></a></td>
|
||||
</tr>
|
||||
<?php }
|
||||
?>
|
||||
</table>
|
||||
<?php }
|
||||
}
|
||||
?>
|
||||
|
||||
<br class="clear-margins" />
|
||||
</div>
|
||||
<div class="post-page-foot"></div>
|
||||
</div>
|
||||
|
||||
<?php include(TEMPLATEPATH . '/sidebar.php') ?>
|
||||
<?php include(get_template_directory() . '/sidebar.php') ?>
|
||||
|
||||
<?php get_footer() ?>
|
10
archive.php
10
archive.php
|
@ -6,7 +6,7 @@
|
|||
|
||||
// why can't wordpress allow for post date asc sorting out of the box...
|
||||
|
||||
$posts = query_posts($query_string.'&order=asc');
|
||||
$posts = query_posts($query_string . '&order=asc');
|
||||
while (have_posts()) {
|
||||
the_post();
|
||||
|
||||
|
@ -15,13 +15,9 @@
|
|||
} else {
|
||||
include(dirname(__FILE__) . '/partials/archive-blog-post.inc');
|
||||
}
|
||||
} ?>
|
||||
}
|
||||
|
||||
<div class="pagenav">
|
||||
<div class="pagenav-right"><?php next_posts_link('Next Page ›') ?></div>
|
||||
<div class="pagenav-left"><?php previous_posts_link('‹ Previous Page') ?></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
include(dirname(__FILE__) . '/partials/archive-page-nav.inc');
|
||||
|
||||
<?php } else { ?>
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ class ComicPress {
|
|||
'category_order' => false,
|
||||
'blogpost_count' => 10
|
||||
);
|
||||
var $additional_stylesheets = array();
|
||||
|
||||
var $comic_post_attachments_cache = array();
|
||||
|
||||
|
@ -33,6 +34,14 @@ class ComicPress {
|
|||
$this->flatten_categories();
|
||||
$this->separate_categories();
|
||||
$this->sort_comic_categories();
|
||||
|
||||
add_action('wp_head', array(&$this, 'wp_head'));
|
||||
}
|
||||
|
||||
function wp_head() {
|
||||
foreach ($this->additional_stylesheets as $uri) { ?>
|
||||
<link rel="stylesheet" href="<?php echo get_template_directory_uri() . $uri ?>" type="text/css" />
|
||||
<?php }
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
39
index.php
39
index.php
|
@ -14,33 +14,28 @@
|
|||
<?php } ?>
|
||||
|
||||
<div id="content" class="narrowcolumn">
|
||||
<?php if (!is_paged()) { include(dirname(__FILE__) . '/partials/index-comic-post.inc'); } ?>
|
||||
|
||||
<?php if (!is_paged()) { include(dirname(__FILE__) . '/partials/index-comic-post.inc'); } ?>
|
||||
<div id="blogheader"><!-- This area can be used for a heading above your main page blog posts --></div>
|
||||
|
||||
<div id="blogheader"><!-- This area can be used for a heading above your main page blog posts --></div>
|
||||
<?php
|
||||
$wp_query = new WP_Query();
|
||||
$wp_query->query(
|
||||
'showposts=' .
|
||||
(int)$comicpress->comicpress_options['blogpost_count'] .
|
||||
'&cat=-' .
|
||||
$comicpress->comicpress_options['comic_category_id'] .
|
||||
'&paged=' .
|
||||
$paged
|
||||
);
|
||||
|
||||
<?php
|
||||
$wp_query = new WP_Query();
|
||||
$wp_query->query(
|
||||
'showposts=' .
|
||||
(int)$comicpress->comicpress_options['blogpost_count'] .
|
||||
'&cat=-' .
|
||||
$comicpress->comicpress_options['comic_category_id'] .
|
||||
'&paged=' .
|
||||
$paged
|
||||
);
|
||||
while ($wp_query->have_posts()) {
|
||||
$wp_query->the_post();
|
||||
include(dirname(__FILE__) . '/partials/index-blog-post.inc');
|
||||
}
|
||||
|
||||
while ($wp_query->have_posts()) {
|
||||
$wp_query->the_post();
|
||||
include(dirname(__FILE__) . '/partials/index-blog-post.inc');
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="pagenav">
|
||||
<div class="pagenav-right"><?php previous_posts_link(__('Newer Entries ↑', 'comicpress')) ?></div>
|
||||
<div class="pagenav-left"><?php next_posts_link(__('↓ Previous Entries', 'comicpress')) ?></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php include(dirname(__FILE__) . '/sidebar.php') ?>
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<div class="pagenav">
|
||||
<div class="pagenav-right"><?php next_posts_link('Next Page ›') ?></div>
|
||||
<div class="pagenav-left"><?php previous_posts_link('‹ Previous Page') ?></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
|
@ -0,0 +1,5 @@
|
|||
<div class="pagenav">
|
||||
<div class="pagenav-right"><?php previous_posts_link(__('Newer Entries ↑', 'comicpress')) ?></div>
|
||||
<div class="pagenav-left"><?php next_posts_link(__('↓ Previous Entries', 'comicpress')) ?></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
|
@ -0,0 +1,6 @@
|
|||
<div class="post-head"></div>
|
||||
<div class="post">
|
||||
<p>Sorry, no posts matched your criteria.</p>
|
||||
<br class="clear-margins" />
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
11
single.php
11
single.php
|
@ -28,14 +28,9 @@
|
|||
|
||||
comments_template();
|
||||
}
|
||||
} else { ?>
|
||||
<div class="post-head"></div>
|
||||
<div class="post">
|
||||
<p>Sorry, no posts matched your criteria.</p>
|
||||
<br class="clear-margins" />
|
||||
</div>
|
||||
<div class="post-foot"></div>
|
||||
<?php }
|
||||
} else {
|
||||
include(dirname(__FILE_) . '/partials/single-no-matches.inc');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
.archive-date {
|
||||
padding: 0 5px 0 0;
|
||||
font-size: 11px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.archive-title {
|
||||
padding: 2px 5px;
|
||||
line-height: 11px;
|
||||
border-left: 1px solid #000;
|
||||
}
|
||||
|
||||
.month-table {
|
||||
border-collapse: collapse;
|
||||
margin: 0 0 20px 0;
|
||||
}
|
Loading…
Reference in New Issue