Skip to content

Instantly share code, notes, and snippets.

@aliboy08
Created November 15, 2018 06:38
Show Gist options
  • Save aliboy08/adbfdb71d798b85416be60a09d546a2a to your computer and use it in GitHub Desktop.
Save aliboy08/adbfdb71d798b85416be60a09d546a2a to your computer and use it in GitHub Desktop.
Retina script fix after genesis update
// Logo Markup
add_filter('genesis_seo_title', 'ff_seo_title', 10, 3);
function ff_seo_title($title, $inside, $wrap) {
// Get Logo
$site_logo = get_field('site_logo', 'option');
$default_logo_url = get_stylesheet_directory_uri() . '/images/logo.png';
$size_attributes = ' width="'. $site_logo['width'] .'" height="'. $site_logo['height'] .'"';
// Set Logo
$logo_url = ( $site_logo ) ? $site_logo['url'] : $default_logo_url;
return buffer_action('fbf_before_site_logo') . apply_filters('fbf_site_logo', '<a href="'. home_url() .'" title="'. get_bloginfo('title') .'"><img id="site_logo_image" '. $size_attributes .' src="'. $logo_url .'" alt="'. get_bloginfo('title') .' Logo" data-rjs="2"/></a>') . buffer_action('fbf_after_site_logo');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment