Skip to content

Instantly share code, notes, and snippets.

View spencermorin's full-sized avatar

Spencer Cameron-Morin spencermorin

View GitHub Profile
<?php $color_palette = get_post_meta( get_the_ID(), 'color-palette' ); ?>
<?php foreach( $color_palette[ 0 ] as $color ) : ?>
<div style="width: 50px; height: 50px; background: #<?php echo $color; ?>"></div>
<?php endforeach; ?>
@spencermorin
spencermorin / gist:4948165
Last active December 13, 2015 17:28
Remove default Facebook Comments placement on WordPress.com VIP.
<?php
// In theme's functions.php.
function pl_remove_facebook_comments() {
remove_filter( 'the_content', 'fb_comments_automatic', 30 );
remove_filter( 'comments_array', 'fb_close_wp_comments' );
remove_filter( 'the_posts', 'fb_set_wp_comment_status' );
remove_action( 'wp_enqueue_scripts', 'fb_hide_wp_comments' );
remove_filter( 'comments_number', 'fb_get_comments_count' );
}