lots of cleanup
This commit is contained in:
parent
2d483c6529
commit
60dd9db476
@ -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');
|
query_posts($query_string . '&order=asc');
|
||||||
while (have_posts()) {
|
while (have_posts()) {
|
||||||
the_post();
|
the_post();
|
||||||
|
|
||||||
|
10
partials/search-comic-post.inc
Normal file
10
partials/search-comic-post.inc
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<div class="post-comic-head"></div>
|
||||||
|
<div class="post-comic">
|
||||||
|
<div class="comicarchiveframe" style="width:<?php echo $archive_comic_width ?>px;">
|
||||||
|
<a href="<?php the_permalink() ?>"><img src="<?php the_comic_archive() ?>" alt="Click for full size." title="Click for full size" width="<?php echo $archive_comic_width ?>" /><br />
|
||||||
|
<h3><?php the_title() ?></h3>
|
||||||
|
<small><?php the_time('F jS, Y') ?></small></a>
|
||||||
|
</div>
|
||||||
|
<br class="clear-margins" />
|
||||||
|
</div>
|
||||||
|
<div class="post-comic-foot"></div>
|
8
partials/search-not-found.inc
Normal file
8
partials/search-not-found.inc
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<div class="post-page-head"></div>
|
||||||
|
<div class="post-page">
|
||||||
|
<h3>No entries found.</h3>
|
||||||
|
<p>Try another search?</p>
|
||||||
|
<p><?php include (get_template_directory() . '/searchform.php') ?></p>
|
||||||
|
<br class="clear-margins" />
|
||||||
|
</div>
|
||||||
|
<div class="post-page-foot"></div>
|
7
partials/search-page-nav.inc
Normal file
7
partials/search-page-nav.inc
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?php if(function_exists('wp_page_numbers')) { wp_page_numbers(); } else { ?>
|
||||||
|
<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>
|
||||||
|
<?php } ?>
|
7
partials/search-results-count.inc
Normal file
7
partials/search-results-count.inc
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<div class="post-page-head"></div>
|
||||||
|
<div class="post-page">
|
||||||
|
<?php $count = $wp_query->post_count; ?>
|
||||||
|
<h2 class="pagetitle">Search for ‘<?php the_search_query() ?>’</h2>
|
||||||
|
Found <?php echo $count; ?> result<?php if ($count !== 1) { echo "s"; } ?>.
|
||||||
|
</div>
|
||||||
|
<div class="post-page-foot"></div>
|
83
search.php
83
search.php
@ -1,72 +1,27 @@
|
|||||||
<?php get_header() ?>
|
<?php get_header() ?>
|
||||||
|
|
||||||
<div id="content" class="archive">
|
<div id="content" class="archive">
|
||||||
|
|
||||||
<div class="post-page-head"></div>
|
|
||||||
<div class="post-page">
|
|
||||||
<?php
|
<?php
|
||||||
$tmp_search = new WP_Query('s=' . wp_specialchars($_GET['s']) . '&show_posts=-1&posts_per_page=-1');
|
include(get_template_directory() . '/partials/search-results-count.inc');
|
||||||
$count = $tmp_search->post_count;
|
|
||||||
|
if (have_posts()) {
|
||||||
|
query_posts($query_string . '&order=asc');
|
||||||
|
|
||||||
|
while (have_posts()) {
|
||||||
|
the_post();
|
||||||
|
|
||||||
|
if (in_comic_category()) {
|
||||||
|
include(get_template_directory() . '/partials/archive-comic-post.inc');
|
||||||
|
} else {
|
||||||
|
include(get_template_directory() . '/partials/archive-blog-post.inc');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
include(get_template_directory() . '/partials/archive-page-nav.inc');
|
||||||
|
} else {
|
||||||
|
include(get_template_directory() . '/partials/search-not-found.inc');
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
<h2 class="pagetitle">Search for ‘<?php the_search_query() ?>’</h2>
|
|
||||||
Found <?php echo $count; ?> result<?php if ($count !== 1) { echo "s"; } ?>.
|
|
||||||
</div>
|
|
||||||
<div class="post-page-foot"></div>
|
|
||||||
|
|
||||||
<?php if (have_posts()) : ?>
|
|
||||||
|
|
||||||
<?php $posts = query_posts($query_string.'&order=asc');
|
|
||||||
while (have_posts()) : the_post() ?>
|
|
||||||
|
|
||||||
<?php global $archive_comic_width; if (in_comic_category()) { ?>
|
|
||||||
|
|
||||||
<div class="post-comic-head"></div>
|
|
||||||
<div class="post-comic">
|
|
||||||
<div class="comicarchiveframe" style="width:<?php echo $archive_comic_width ?>px;">
|
|
||||||
<a href="<?php the_permalink() ?>"><img src="<?php the_comic_archive() ?>" alt="Click for full size." title="Click for full size" width="<?php echo $archive_comic_width ?>" /><br />
|
|
||||||
<h3><?php the_title() ?></h3>
|
|
||||||
<small><?php the_time('F jS, Y') ?></small></a>
|
|
||||||
</div>
|
|
||||||
<br class="clear-margins" />
|
|
||||||
</div>
|
|
||||||
<div class="post-comic-foot"></div>
|
|
||||||
|
|
||||||
<?php } else { ?>
|
|
||||||
|
|
||||||
<div class="post-head"></div>
|
|
||||||
<div class="post">
|
|
||||||
<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title() ?>"><?php the_title() ?></a></h3>
|
|
||||||
<div class="postdate"><?php the_time('F jS, Y') ?></div>
|
|
||||||
<?php the_excerpt() ?>
|
|
||||||
<br class="clear-margins" />
|
|
||||||
</div>
|
|
||||||
<div class="post-foot"></div>
|
|
||||||
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<?php endwhile ?>
|
|
||||||
|
|
||||||
<?php if(function_exists('wp_page_numbers')) { wp_page_numbers(); } else { ?>
|
|
||||||
<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>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<?php else : ?>
|
|
||||||
|
|
||||||
<div class="post-page-head"></div>
|
|
||||||
<div class="post-page">
|
|
||||||
<h3>No entries found.</h3>
|
|
||||||
<p>Try another search?</p>
|
|
||||||
<p><?php include (get_template_directory() . '/searchform.php') ?></p>
|
|
||||||
<br class="clear-margins" />
|
|
||||||
</div>
|
|
||||||
<div class="post-page-foot"></div>
|
|
||||||
|
|
||||||
<?php endif ?>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php include(get_template_directory() . '/sidebar.php') ?>
|
<?php include(get_template_directory() . '/sidebar.php') ?>
|
||||||
|
@ -2,9 +2,7 @@
|
|||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
|
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) { ?>
|
||||||
|
|
||||||
<?php widget_comicpress_comic_bookmark() ?>
|
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<?php get_calendar(); ?>
|
<?php get_calendar(); ?>
|
||||||
@ -17,8 +15,6 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<?php widget_comicpress_latest_comics(); ?>
|
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<h2>Monthly Archives</h2>
|
<h2>Monthly Archives</h2>
|
||||||
<ul>
|
<ul>
|
||||||
@ -34,7 +30,7 @@
|
|||||||
<?php include (get_template_directory() . '/searchform.php'); ?>
|
<?php include (get_template_directory() . '/searchform.php'); ?>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<?php endif; ?>
|
<?php } ?>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user