Related posts - converted to standardized <ul> listing. Added 4th heading (h4) for global use.
This commit is contained in:
parent
4896100fbe
commit
35fae562c3
|
@ -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);
|
||||
|
|
23
style.css
23
style.css
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue