This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/********************************** | |
* | |
* Replace Header Site Title with Inline Logo | |
* Fix Genesis bug - when using static front page and blog page (admin reading settings) Home page is <p> tag and Blog page is <h1> tag | |
* Replace "is_home" with "is_front_page" to correctly display Home page wit <h1> tag and Blog page with <p> tag | |
* | |
* @author AlphaBlossom / Tony Eppright | |
* @link http://www.alphablossom.com | |
* | |
************************************/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* Make Font Awesome available | |
add_action( 'wp_enqueue_scripts', 'enqueue_font_awesome' ); | |
function enqueue_font_awesome() { | |
wp_enqueue_style( 'font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css' ); | |
} | |
//* Customize search form input box text | |
add_filter( 'genesis_search_text', 'sp_search_text' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* WordPress allows UTF8 characters such as copyright symbol in filenames but these break in Safari | |
* | |
* @see https://wordpress.org/support/topic/uploaded-image-with-accents-in-name-image-dont-show-in-safari-6 for original function | |
* @see https://core.trac.wordpress.org/ticket/22363 for progress on fixing this bug | |
* | |
* #wordpress | |
*/ | |
function sanitize_filename_on_upload($filename) { | |
$ext = end(explode('.',$filename)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Remove breadcrumbs | |
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' ); | |
//* Force full width content | |
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); | |
//* Remove entry meta in entry header | |
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
// Ping Facebook with (via a POST request) to refresh the cache (scrape) for a scheduled post as it is published | |
// Relevant docs: https://developers.facebook.com/docs/opengraph/using-objects#selfhosted-update | |
// Place this in your Wordpress functions.php file | |
// https://gist.github.com/andrewspear/3d9015b1c1d652b4a862 | |
// Credit Andrew Spear | |
add_action('transition_post_status', 'purge_future_post', 10, 3); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function add_poster_to_video( $atts, $slide_id, $slider_id, $settings, $url ) { | |
$atts['poster'] = $url; | |
// unset($atts['autoplay']); // this stop video auto playing - remove this when site goes live | |
return $atts; | |
} | |
add_filter('metaslider_layer_video_attributes','add_poster_to_video', 10, 5); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Add class to .content | |
add_filter( 'genesis_attr_content', 'beatm_facetwp_class' ); | |
function beatm_facetwp_class( $attributes ) { | |
$attributes['class'] = $attributes['class']. ' facetwp-template'; | |
return $attributes; | |
} |