Skip to content

Commit

Permalink
Prettied up and Normalized VOICE Opinion Posts grid
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre Bulatov committed Jan 29, 2016
1 parent 92fefc6 commit 06f704e
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 29 deletions.
77 changes: 51 additions & 26 deletions wp-content/themes/mag-wp/archive-opinion_post.php
Expand Up @@ -11,7 +11,7 @@


<!-- Begin Wrap Content -->
<div class="wrap-fullwidth hfeed h-feed">
<div class="wrap-fullwidth">

<!-- Begin Main Home Content 950px -->
<div class="home-content">
Expand All @@ -33,36 +33,61 @@
query_posts( array( 'post_type' => 'opinion_post', 'paged' => $paged ) );
if (have_posts()) : while (have_posts()) : the_post();
?>

<li <?php post_class('') ?> id="post-<?php the_ID(); ?>">
<li <?php post_class('hentry h-entry') ?> id="post-<?php the_ID(); ?>">
<?php if ( has_post_thumbnail()) { ?>
<div class="entry-thumb-cont">
<a href="<?php the_permalink(); ?>" class="entry-thumbnail">
<?php echo the_post_thumbnail('thumbnail-masonry'); ?>
</a>
<?php } else { ?>
<a href="<?php the_permalink(); ?>" class="entry-thumbnail">
<img src="<?php echo get_template_directory_uri(); ?>/images/article-img.png" alt="article image" />
</a>
<?php } // Post Thumbnail ?> <div class="clear"></div>
<div class="clear"></div>

<?php if ( has_post_thumbnail()) { ?>
<div class="post-date">
<span class="month"><?php the_time('M', '', '', true); ?></span>
<span class="day"><?php the_time('d', '', '', true); ?></span>
</div><!-- end .post-date -->

<a href="<?php the_permalink(); ?>"> <?php echo the_post_thumbnail('thumbnail-masonry'); ?></a>

<?php } else { ?>
<div class="post-date">
<span class="month"><?php the_time('M', '', '', true); ?></span>
<span class="day"><?php the_time('d', '', '', true); ?></span>
</div><!-- end .post-date -->
<a href="<?php the_permalink(); ?>"><img src="<?php echo get_template_directory_uri(); ?>/images/article-img.png" alt="article image" /></a>
<?php } // Post Thumbnail ?> <div class="clear"></div>
<div class="article-category">
<div class="post-date date updated">
<span class="month"><?php the_time('M', '', '', true); ?></span>
<span class="day"><?php the_time('d', '', '', true); ?></span>
</div>
<span class="vcard author p-author h-card">
<span class="fn">
<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>">
<spam class="entry-author-first given-name"><?php the_author_meta('first_name'); ?></spam>
<span class="entry-author-last family-name"><?php the_author_meta('last_name'); ?></span>
</a>
</span>
</span>
<?php
$category = get_the_category();
if ($category) {
echo '<a href="' . get_category_link( $category[0]->term_id ) . '" class="tiptipBlog" title="' . sprintf( __( "View all posts in %s", "anthemes" ), $category[0]->name ) . '" rel="tag" ' . '>' . $category[0]->name.'</a> ';}
?>
</div>
</div>

<div class="an-content">
<h2 class="article-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<h2 class="article-title entry-title">
<a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
</h2>
<p class="article-summary entry-summary"><?php echo anthemes_excerpt(strip_tags(strip_shortcodes(get_the_excerpt())), 130); ?></p>
<div class="entry-footer">
<p class="entry-comment-count">
Comments: (<?php comments_number( '0', '1', '%' ); ?>)
</p>
<p class="entry-read-more">
<a href="<?php the_permalink(); ?>" title="Read the whole article.">Read More...</a>
</p>
<div class="entry-empty-box">&nbsp;
<?php if(function_exists('taqyeem_get_score')) { ?>
<?php taqyeem_get_score(); ?>
<?php } ?>
</div>
</div>

<?php if(function_exists('taqyeem_get_score')) { ?>
<?php taqyeem_get_score(); ?>
<?php } ?>
<span><?php _e('by', 'anthemes'); ?> <?php the_author_posts_link(); ?></span>
<span><?php _e('in', 'anthemes'); ?> <?php $category = get_the_category(); if ($category) { echo '<a href="' . get_category_link( $category[0]->term_id ) . '">' . $category[0]->name.'</a> ';} ?></span>
<p><?php echo anthemes_excerpt(strip_tags(strip_shortcodes(get_the_excerpt())), 105); ?></p>
</div><!-- end .an-content -->

</li>
<?php endwhile; endif; ?>
</ul><!-- end .classic-blog -->
Expand Down
9 changes: 6 additions & 3 deletions wp-content/themes/mag-wp/css/colors/default.css
Expand Up @@ -2008,8 +2008,11 @@ h6.post-answer {
}




/* Voices -- opinion post */
ul#masonry_list li.opinion_post a.entry-thumbnail {
width: 266px;
height: 122px !important;
}
/* Album reviews */
.single-content .review .review_info h2 {
color: #e34848;
Expand Down Expand Up @@ -2038,7 +2041,7 @@ ul#masonry_list li a.entry-thumbnail {
position: relative;
}
ul#masonry_list li a.entry-thumbnail img {
height: 100% !important;
height: auto !important;
width: 100%;
position: absolute;
top: -100%;
Expand Down

0 comments on commit 06f704e

Please sign in to comment.