Skip to content

Instantly share code, notes, and snippets.

View flashingcursor's full-sized avatar

Gil Rutkowski flashingcursor

View GitHub Profile
@flashingcursor
flashingcursor / remove_hentry.php
Created October 8, 2012 06:28
Strip hentry from WordPress posts...
<?php
/**
* Remove the hentry class from posts in WordPress - could really remove any class using various class filters,
* like body_class using this technique.
*
* @param array $classes
* @return array
*/
add_filter( 'post_class', 'fc_remove_hentry', 20 );
@flashingcursor
flashingcursor / gist:3259625
Created August 4, 2012 20:02
Creating a default template for WordPress custom post types with Theme override. This is broken down to limit it to a single view, but could also be modified for a default archive view, etc...
<?php
add_filter( 'template_include', 'default_mycpt_template', 100 );
/**
* Setup a default template for your CPT if the current theme doesn't already have one.
* @return void
*/
function default_mycpt_template( $template )
{