Skip to content

Instantly share code, notes, and snippets.

View designbuildtest's full-sized avatar

designbuildtest

View GitHub Profile
@designbuildtest
designbuildtest / gist:4ae2c9206d74d14b185a
Last active August 29, 2015 14:01
Disable WordPress Media Attachment Comments
<?php
/*
* http://www.wpbeginner.com/wp-tutorials/how-to-disable-comments-on-wordpress-media-attachments/
*/
function filter_media_comment_status( $open, $post_id ) {
$post = get_post( $post_id );
if( $post->post_type == 'attachment' ) {
return false;
}
return $open;
@designbuildtest
designbuildtest / gist:e31d3385edbb070ed24f
Last active August 29, 2015 14:01
Use full version of FlexSlider in twentyfourteen theme
<?php
/** Remember to remove the below featuredslider (note custom name) js stuff in functions.js file
*
_window.load( function() {
if ( body.is( '.slider' ) ) {
$( '.featured-content' ).featuredslider( {
selector: '.featured-content-inner > article',
controlsContainer: '.featured-content'
} );
@designbuildtest
designbuildtest / gist:b140e21180348df4c5c0
Last active August 29, 2015 14:01
Customizer logo function
<?php
/**
* Custom site logo function.
*
* Check if a site logo has been uploaded. If a site logo is present, query the database to retrieve
* the medium sized version of the image. This function prevents excessively large logo images being
* displayed on the frontend.
*/
function twentyfourteen_site_logo() {
$site_logo = get_theme_mod( 'site_logo' );