Related posts - converted to standardized <ul> listing. Added 4th heading (h4) for global use.

This commit is contained in:
mindfaucet 2009-12-21 13:06:20 -07:00
parent 4896100fbe
commit 35fae562c3
2 changed files with 11 additions and 21 deletions

View File

@ -65,15 +65,14 @@ class ComicPressRelatedPosts {
$output = array();
if (!empty($posts)) {
$output[] = '<div class="related_posts">';
$output[] = '<span class="related_posts_title">' . $title . '</span>';
$output[] = '<ul><li><table class="month-table">';
$output[] = '<h4>' . $title . '</h4>';
$output[] = '<ul>';
foreach ($posts as $post) {
if (array_intersect($this->related_categories, wp_get_post_categories($post->ID))) {
$output[] = '<tr><td class="archive-date" align="right">' . date('M j, Y', strtotime($post->post_date)) . '</td>';
$output[] = '<td class="archive-title"><a title="' . esc_attr(get_the_title($post)) . '" href="' . esc_attr(get_permalink($post)) . '">' . esc_html(get_the_title($post)) . '</a></td></tr>';
$output[] = '<li><a title="' . esc_attr(get_the_title($post)) . '" href="' . esc_attr(get_permalink($post)) . '">' . esc_html(get_the_title($post)) . '</a></li>';
}
}
$output[] = '</table></li></ul>';
$output[] = '</ul>';
$output[] = '</div>';
}
return implode('', $output);

View File

@ -127,7 +127,6 @@ h2, h2 a {
margin-top: 10px;
font-size: 28px;
letter-spacing: -2px;
font-weight: 500;
clear: both;
}
@ -139,6 +138,13 @@ h3, h3 a {
letter-spacing: -1px;
}
h4, h4 a {
padding: 0;
margin: 0;
font-size: 14px;
clear: both;
}
/* THE PAGE WRAPPER */
#page {
@ -563,21 +569,6 @@ h3, h3 a {
font-size: 11px;
}
.related_posts {
margin-top: 10px;
font-weight: 700;
}
.related_posts_title {
font-size: 14px;
}
.related_posts ul {
list-style: none;
font-weight: normal;
font-size: 12px;
}
.post .members-only, .post-comic .members-only {
border: 1px dotted #000;
background: #fafafa;