diff --git a/index.php b/index.php index 32449c9..2a9a36b 100644 --- a/index.php +++ b/index.php @@ -2,12 +2,15 @@ is_archive = false; if (have_posts()) { - comicpress_display_post(); + while (have_posts()) : the_post(); + comicpress_display_post(); + endwhile; } Restore(); UnProtect(); diff --git a/layout-foot.php b/layout-foot.php index bd5658e..58bb8ce 100644 --- a/layout-foot.php +++ b/layout-foot.php @@ -1,5 +1,4 @@ - diff --git a/layout-head.php b/layout-head.php index 8d02107..f42fd64 100644 --- a/layout-head.php +++ b/layout-head.php @@ -17,28 +17,31 @@
-
ID; - $wp_query->is_single = true; - comicpress_display_comic_area(); - endwhile; + if (is_home()) { + if (!$comicpress_options['disable_comic_frontpage']) { + Protect(); + $comic_query = 'showposts=1&cat='.get_all_comic_categories_as_cat_string(); + query_posts($comic_query); + if (have_posts()) { + while (have_posts()) : the_post(); + $temp_single = $wp_query->is_single; + $wp_query->is_single = true; + comicpress_display_comic_area(); + $wp_query->is_single = $temp_single; + $temp_single = null; + endwhile; + } + Restore(); + UnProtect(); + wp_reset_query(); + } + } else { + if (is_single() && in_comic_category()) { + comicpress_display_comic_area(); } - Restore(); - UnProtect(); - wp_reset_query(); - } - if (is_single() & in_comic_category()) { - comicpress_display_comic_area(); } ?> @@ -57,7 +60,6 @@
-
diff --git a/style.css b/style.css index 4677aad..b388353 100644 --- a/style.css +++ b/style.css @@ -443,8 +443,8 @@ h4, h4 a { } .narrowcolumn { - width: 540px; - padding: 5px 10px; + width: 550px; + padding: 0 5px; } /* add 10px to smaller width layouts */ @@ -458,10 +458,6 @@ h4, h4 a { overflow: hidden; } - .column { - overflow: hidden; - } - .column_one { width: 48%; float: left; @@ -474,18 +470,15 @@ h4, h4 a { padding: 1%; } -.post, .post-page { - clear: both; - text-align: left; - padding: 2px; - margin-bottom: 20px; -} +.post {} .post-content { padding: 3px; } -.post-foot { +.home .post-blog .post-foot, +.page-template-blog-php .post-foot { + margin-bottom: 40px; } .post-image { diff --git a/widgets/ComicBlogPostWidget.inc b/widgets/ComicBlogPostWidget.inc index a79e3ce..d74fd77 100644 --- a/widgets/ComicBlogPostWidget.inc +++ b/widgets/ComicBlogPostWidget.inc @@ -33,8 +33,11 @@ class ComicPressComicBlogPostWidget extends WP_Widget { $temp_query = $wp_query->is_single; $wp_query->is_single = true; $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']); - if ( !empty( $title ) ) { echo "
".$title."
\r\n"; } + if (!empty($title)) { echo "
".$title."
\r\n"; } + if ($instance['showtitle']) { echo "
".get_the_title()."
\r\n"; } + if ($instance['showdate']) { echo "
".get_the_time('F jS, Y')."
\r\n"; } the_content(); + if ($instance['showcommentlink']) comicpress_display_comment_link(); $wp_query->is_single = $temp_query; echo $after_widget; } @@ -44,11 +47,14 @@ class ComicPressComicBlogPostWidget extends WP_Widget { UnProtect(); wp_reset_query(); } else { - if (!empty($post->post_content)) { + if (!empty($post->post_content) && in_comic_category()) { echo $before_widget; $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']); - if ( !empty( $title ) ) { echo "
".$title."
\r\n"; } + if (!empty($title)) { echo "
".$title."
\r\n"; } + if ($instance['showtitle']) { echo "
".get_the_title()."
\r\n"; } + if ($instance['showdate']) { echo "
".get_the_time('F jS, Y')."
\r\n"; } the_content(); + if ($instance['showcommentlink']) comicpress_display_comment_link(); echo $after_widget; } } @@ -57,17 +63,27 @@ class ComicPressComicBlogPostWidget extends WP_Widget { function update($new_instance, $old_instance) { $instance = $old_instance; $instance['title'] = strip_tags($new_instance['title']); - $instance['onlyhome'] = (bool)( $new_instance['onlyhome'] == 1 ? true : false ); + $instance['onlyhome'] = (bool)( $new_instance['onlyhome'] == 1 ? true : false ); + $instance['showtitle'] = (bool)( $new_instance['showtitle'] == 1 ? true : false ); + $instance['showdate'] = (bool)( $new_instance['showdate'] == 1 ? true : false ); + $instance['showcommentlink'] = (bool)( $new_instance['showcommentlink'] == 1 ? true : false ); return $instance; } function form($instance) { - $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'onlyhome' => false ) ); + $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'onlyhome' => false, 'showtitle' => false, 'showdate' => false, 'showcommentlink' => false ) ); $title = strip_tags($instance['title']); $onlyhome = $instance['onlyhome']; + $showtitle = $instance['showtitle']; + $showdate = $instance['showdate']; + $showcommentlink = $instance['showcommentlink']; ?>

-

+

+

+

+

+ - comment_status) { ?> + comment_status) { ?>