Skip to content

Instantly share code, notes, and snippets.

View dcooney's full-sized avatar

Darren Cooney dcooney

View GitHub Profile
// Get event posts
$event_posts = get_posts( array(
'post_type' => 'event',
'post_status' => 'publish',
'meta_key' => 'event-date-start',
'meta_compare' => '>=',
'meta_value' => date( 'Ymd' ),
'orderby' => 'meta_value_num',
'order' => 'ASC',
<?php
global $post;
$votes = StoryVote::votes($post->ID);
?>
<div class="story clearfix" id="<?php echo $post->ID; ?>">
<span class="date">
<span class="big"><?php echo get_the_date("j"); ?></span>
<?php echo get_the_date("M / Y"); ?>
</span>
@dcooney
dcooney / wp-comment-walker
Created November 15, 2015 13:12 — forked from georgiecel/wp-comment-walker
Custom comment walker for HTML5 friendly WordPress comment and threaded replies. To be inserted in functions.php.
<?php
class comment_walker extends Walker_Comment {
var $tree_type = 'comment';
var $db_fields = array( 'parent' => 'comment_parent', 'id' => 'comment_ID' );
// constructor – wrapper for the comments list
function __construct() { ?>
<section class="comments-list">