Skip to content

Instantly share code, notes, and snippets.


Chris Field PittsburghChris

View GitHub Profile
PittsburghChris / functions.php
Last active Dec 29, 2015 — forked from studiopress/functions.php
How to add Google Fonts to an HTML5-compatible Genesis child theme after 2013.
View functions.php
//* Do NOT include the opening php tag
//* Enqueue Lato Google font
add_action( 'wp_enqueue_scripts', 'sp_load_google_fonts', 5);
function sp_load_google_fonts() {
wp_enqueue_style( 'google-font-lato', '//,700', array(), CHILD_THEME_VERSION );
View CTA-Widgets.php
* Add CTA widget support for site. If widget not active, don't display
function mp_cta_genesis() {
// Don't display the CTA on the home page, since it's built into the MP theme
if ( is_home() ) {
View header-url.php
//* Do NOT include the opening php tag
//* Modify the header URL
add_filter('genesis_seo_title', 'sp_seo_title', 10, 3);
function sp_seo_title($title, $inside, $wrap) {
$inside = sprintf( '<a href="" title="%s">%s</a>', esc_attr( get_bloginfo('name') ), get_bloginfo('name') );
$title = sprintf('<%s id="title">%s</%s>', $wrap, $inside, $wrap);
return $title;