function comicpress_dual_columns() { global $comicpress_options; ?> <div id="dualcolumns"> <div class="column_one"> <div class="column_one_header"></div> <?php $blog_query = 'showposts=' . $comicpress_options['blog_postcount'] . '&cat="-' . exclude_comic_categories() . '"&author=' . $comicpress_options['author_column_one'] . '&paged=' . $paged; $posts = query_posts($blog_query); if (have_posts()) { while (have_posts()) { the_post(); comicpress_display_post(); } } ?> <span class="viewpostsbyone">View all posts by: <?php the_author_posts_link(); ?> <span><br /> </div> <div class="column_two"> <div class="column_two_header"></div> <?php $blog_query = 'showposts=' . $comicpress_options['blog_postcount'] . '&cat="-' . exclude_comic_categories() . '"&author=' . $comicpress_options['author_column_two']; $posts = query_posts($blog_query); if (have_posts()) { while (have_posts()) { the_post(); comicpress_display_post(); } } ?> <span class="viewpostsbytwo">View all posts by: <?php the_author_posts_link(); ?> </span><br /> </div> <div class="clear"></div> </div> <?php }
<?php /* Template Name: Blog */ get_header(); include get_template_directory() . '/layout-head.php'; ?> <?php if (!$comicpress_options['split_column_in_two']) { $blog_query = 'showposts=' . $comicpress_options['blog_postcount'] . '&cat="-' . exclude_comic_categories() . '"&paged=' . $paged; $posts = query_posts($blog_query); if (have_posts()) { while (have_posts()) { the_post(); comicpress_display_post(); } } comicpress_pagination(); } else { comicpress_dual_columns(); } get_sidebar('underblog'); ?> <?php include get_template_directory() . '/layout-foot.php'; get_footer();
function random_post() { $randomComicQuery = new WP_Query(); $randomComicQuery->query('showposts=1&orderby=rand&cat=-' . exclude_comic_categories()); while ($randomComicQuery->have_posts()) { $randomComicQuery->the_post(); $random_comic_id = get_the_ID(); } wp_redirect(get_permalink($random_comic_id)); exit; }