Skip to content

Instantly share code, notes, and snippets.

@tech6
Created July 31, 2016 20:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tech6/2fe1df6bdc6adde1df958433fd23ef89 to your computer and use it in GitHub Desktop.
Save tech6/2fe1df6bdc6adde1df958433fd23ef89 to your computer and use it in GitHub Desktop.
<?php $votes = StoryVote::votes(get_the_id()); ?>
<div class="story clearfix" id="<?php echo get_the_id(); ?>">
<span class="date">
<span class="big"><?php echo get_the_date("j"); ?></span>
<?php echo get_the_date("M / Y"); ?>
</span>
<div class="story-content">
<?php the_excerpt() ?>
<a href="<?php echo the_permalink() ?>" class="button">Read more</a>
<span class="votes <?php if($votes < 0) { echo 'negative'; } elseif($votes > 0) { echo 'positive'; } ?>">
<div class="count">
<?php echo $votes ?> Points
</div>
</span>
</div><!--/.content-->
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment