more page cleanup
This commit is contained in:
parent
dc62559476
commit
a5ebb8f000
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
*~
|
*~
|
||||||
|
.directory
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ class ComicPressAddonCore extends ComicPressAddon {
|
|||||||
'none' => __('Not a comic', 'comicpress'),
|
'none' => __('Not a comic', 'comicpress'),
|
||||||
'comic' => __('Comic', 'comicpress'),
|
'comic' => __('Comic', 'comicpress'),
|
||||||
'rss' => __('RSS', 'comicpress'),
|
'rss' => __('RSS', 'comicpress'),
|
||||||
'archive' => __('Archive', 'comicpress'),
|
'archive' => __('Archive', 'comicpress')
|
||||||
);
|
);
|
||||||
|
|
||||||
$current_type = get_post_meta($post->ID, 'comic_image_type', true);
|
$current_type = get_post_meta($post->ID, 'comic_image_type', true);
|
||||||
|
@ -4,12 +4,12 @@ Template Name: Comic Calendar Archive
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
global $comicpress;
|
global $comicpress;
|
||||||
|
|
||||||
|
$comicpress->additional_stylesheets[] = '/style/archive-comic-calendar.css';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php get_header() ?>
|
<?php get_header() ?>
|
||||||
|
|
||||||
<link rel="stylesheet" href="<?php echo get_template_directory_uri() . '/style/archive-comic-calendar.css' ?>" type="text/css" />
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$dayWidth = 22; //set to .cpcal-day total width in pixels including: width, left & right border, left & right margin, left & right padding
|
$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
|
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 id="content" class="narrowcolumn">
|
||||||
|
|
||||||
<div class="post-page-head"></div>
|
<div class="post-page-head"></div>
|
||||||
<div class="post-page">
|
<div class="post-page">
|
||||||
<h2 class="pagetitle"><?php the_title() ?></h2>
|
<h2 class="pagetitle"><?php the_title() ?></h2>
|
||||||
<div class="entry">
|
<div class="entry">
|
||||||
<?php while (have_posts()) : the_post(); the_content(); endwhile; ?>
|
<?php while (have_posts()) { the_post(); the_content(); } ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
<?php $years = $wpdb->get_col("SELECT DISTINCT YEAR(post_date) FROM $wpdb->posts WHERE post_status = 'publish' ORDER BY post_date DESC");
|
$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 ) {
|
foreach ( $years as $year ) {
|
||||||
if ($year != (0) ) { ?>
|
if (!empty($year)) { ?>
|
||||||
<h3><?php echo $year ?></h3>
|
<h3><?php echo $year ?></h3>
|
||||||
<table class="month-table">
|
<table class="month-table">
|
||||||
<?php $comicArchive = new WP_Query(); $comicArchive->query('showposts=10000&cat='.get_all_comic_categories_as_cat_string().'&year='.$year);
|
<?php
|
||||||
while ($comicArchive->have_posts()) : $comicArchive->the_post() ?>
|
$comic_archive = new WP_Query();
|
||||||
<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>
|
$comic_archive->query('showposts=10000&cat=' . $comicpress->get_all_comic_categories_as_cat_string() . '&year='.$year);
|
||||||
<?php endwhile; ?>
|
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>
|
</table>
|
||||||
<?php } } ?>
|
<?php }
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
<br class="clear-margins" />
|
<br class="clear-margins" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="post-page-foot"></div>
|
<div class="post-page-foot"></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php include(TEMPLATEPATH . '/sidebar.php') ?>
|
<?php include(get_template_directory() . '/sidebar.php') ?>
|
||||||
|
|
||||||
<?php get_footer() ?>
|
<?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...
|
// 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()) {
|
while (have_posts()) {
|
||||||
the_post();
|
the_post();
|
||||||
|
|
||||||
@ -15,13 +15,9 @@
|
|||||||
} else {
|
} else {
|
||||||
include(dirname(__FILE__) . '/partials/archive-blog-post.inc');
|
include(dirname(__FILE__) . '/partials/archive-blog-post.inc');
|
||||||
}
|
}
|
||||||
} ?>
|
}
|
||||||
|
|
||||||
<div class="pagenav">
|
include(dirname(__FILE__) . '/partials/archive-page-nav.inc');
|
||||||
<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>
|
|
||||||
|
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ class ComicPress {
|
|||||||
'category_order' => false,
|
'category_order' => false,
|
||||||
'blogpost_count' => 10
|
'blogpost_count' => 10
|
||||||
);
|
);
|
||||||
|
var $additional_stylesheets = array();
|
||||||
|
|
||||||
var $comic_post_attachments_cache = array();
|
var $comic_post_attachments_cache = array();
|
||||||
|
|
||||||
@ -33,6 +34,14 @@ class ComicPress {
|
|||||||
$this->flatten_categories();
|
$this->flatten_categories();
|
||||||
$this->separate_categories();
|
$this->separate_categories();
|
||||||
$this->sort_comic_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 }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
15
index.php
15
index.php
@ -14,12 +14,11 @@
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<div id="content" class="narrowcolumn">
|
<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
|
||||||
|
|
||||||
<?php
|
|
||||||
$wp_query = new WP_Query();
|
$wp_query = new WP_Query();
|
||||||
$wp_query->query(
|
$wp_query->query(
|
||||||
'showposts=' .
|
'showposts=' .
|
||||||
@ -34,13 +33,9 @@
|
|||||||
$wp_query->the_post();
|
$wp_query->the_post();
|
||||||
include(dirname(__FILE__) . '/partials/index-blog-post.inc');
|
include(dirname(__FILE__) . '/partials/index-blog-post.inc');
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="pagenav">
|
include(dirname(__FILE__) . '/partials/index-blog-post.inc');
|
||||||
<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>
|
</div>
|
||||||
|
|
||||||
<?php include(dirname(__FILE__) . '/sidebar.php') ?>
|
<?php include(dirname(__FILE__) . '/sidebar.php') ?>
|
||||||
|
5
partials/archive-page-nav.inc
Normal file
5
partials/archive-page-nav.inc
Normal file
@ -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>
|
5
partials/index-page-nav.inc
Normal file
5
partials/index-page-nav.inc
Normal file
@ -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>
|
6
partials/single-no-matches.inc
Normal file
6
partials/single-no-matches.inc
Normal file
@ -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();
|
comments_template();
|
||||||
}
|
}
|
||||||
} else { ?>
|
} else {
|
||||||
<div class="post-head"></div>
|
include(dirname(__FILE_) . '/partials/single-no-matches.inc');
|
||||||
<div class="post">
|
}
|
||||||
<p>Sorry, no posts matched your criteria.</p>
|
|
||||||
<br class="clear-margins" />
|
|
||||||
</div>
|
|
||||||
<div class="post-foot"></div>
|
|
||||||
<?php }
|
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
16
style/archive-comic.css
Normal file
16
style/archive-comic.css
Normal file
@ -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
Block a user