diff --git a/archive-comic-storyline-thumbs.php b/archive-comic-storyline-thumbs.php
index e0c3c48..6abeca9 100644
--- a/archive-comic-storyline-thumbs.php
+++ b/archive-comic-storyline-thumbs.php
@@ -31,12 +31,6 @@ if (have_posts()) {
$description = $category->description;
$first_comic_in_category = get_terminal_post_in_category($category_id,true);
$first_comic_permalink = get_permalink($first_comic_in_category->ID);
- $archive_image = null;
- foreach (array("mini", "archive", "rss", "comic") as $type) {
- if (($requested_archive_image = get_comic_url($type, $first_comic_in_category)) !== false) {
- $archive_image = $requested_archive_image; break;
- }
- }
if ($target_depth < $current_depth) {
echo str_repeat("", ($current_depth - $target_depth));
}
@@ -49,7 +43,7 @@ if (have_posts()) {
>
-
+ cat_name); ?>
cat_name ?>
diff --git a/functions.php b/functions.php
index ca98f84..fc730c3 100644
--- a/functions.php
+++ b/functions.php
@@ -720,9 +720,11 @@ function comicpress_list_storyline_categories($args = "") {
* Display text when image (comic) is hovered
* Text is taken from a custom field named "hovertext"
*/
-function the_hovertext() {
- $hovertext = get_post_meta( get_the_ID(), "hovertext", true );
- return (empty($hovertext)) ? get_the_title() : $hovertext;
+function the_hovertext($post_to_use = null) {
+ global $post;
+ $post_to_use = !is_null($override_post) ? $override_post : $post;
+ $hovertext = get_post_meta( $post_to_use->ID, "hovertext", true );
+ return (empty($hovertext)) ? get_the_title($post_to_use->ID) : $hovertext;
}
/**
diff --git a/functions/displaycomic.php b/functions/displaycomic.php
index 110138b..24d3983 100644
--- a/functions/displaycomic.php
+++ b/functions/displaycomic.php
@@ -1,12 +1,14 @@
ID) ) {
- $comic_image = get_the_post_thumbnail($post->ID,'full');
- $comic_image = preg_replace('#title="([^*]*)"#', 'title="'.the_hovertext().'"', $comic_image);
+ if ( has_post_thumbnail($post_to_use->ID) ) {
+ $comic_image = get_the_post_thumbnail($post_to_use->ID,'full');
+ $comic_image = preg_replace('#title="([^*]*)"#', 'title="'.$title_to_use.'"', $comic_image);
}
}
}
@@ -14,8 +16,8 @@ function comicpress_display_comic_image($searchorder = "comic",$use_post_image =
$searchorder = explode(',',$searchorder);
$requested_archive_image = '';
foreach ($searchorder as $type) {
- if (($requested_archive_image = get_comic_url($type, $post)) !== false) {
- $comic_image = "";
+ if (($requested_archive_image = get_comic_url($type, $post_to_use)) !== false) {
+ $comic_image = "";
break;
}
}