Skip to content

Instantly share code, notes, and snippets.

@NearlyNormal
NearlyNormal / gist:29b9b7067e9ae561c8a6
Created August 3, 2014 13:57
Wordpress recent posts with comment count in sidebar template
<?php
$currentID = get_the_ID();
$args = array(
'orderby' => 'date'
,'order' => 'DESC'
,'showposts'=>6
,'post__not_in' => array($post->ID)
);
@NearlyNormal
NearlyNormal / 0_reuse_code.js
Created August 3, 2014 13:36
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@NearlyNormal
NearlyNormal / gist:e4776787c4d6a60b9ebb
Last active August 29, 2015 14:04
Wordpress recent posts with comment count in sidebar template
<?php
$args = array(
'orderby' => 'date'
,'order' => 'DESC'
,'showposts'=>6
);
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {