Skip to content

Instantly share code, notes, and snippets.

View LeahArmstrong's full-sized avatar

Leah Armstrong LeahArmstrong

View GitHub Profile

Keybase proof

I hereby claim:

  • I am dustinarmstrong on github.
  • I am dustinarmstrong (https://keybase.io/dustinarmstrong) on keybase.
  • I have a public key ASDZqEj0fE2d9AALSJwYVgd86jeuYvWdDTRNsk1U_f4RNQo

To claim this, I am signing this object:

@LeahArmstrong
LeahArmstrong / wp-post-format-query.php
Last active August 29, 2015 14:00
Wordpress Loop Query for filtering posts by format-type
$args = array (
'pagination' => false,
'posts_per_page' => '3',
'ignore_sticky_posts' => true,
'post_type' => 'post',
'tax_query' => array(
array(
// Specifies post-format taxonomy type
'taxonomy' => 'post_format',
'field' => 'slug',
@LeahArmstrong
LeahArmstrong / functions.php
Created June 11, 2013 21:55
Reveal current page template being used by Wordpress
/* Generates current template file name - For debugging only! */
add_filter( 'template_include', 'var_template_include', 1000 );
function var_template_include( $t ){
$GLOBALS['current_theme_template'] = basename($t);
return $t;
}
function get_current_template( $echo = false ) {
if( !isset( $GLOBALS['current_theme_template'] ) )
return false;