I am attempting to use an SVG file for the logo of a site in Wordpress, as you can see from the code below I have tried this be calling in the .svg file. Unfortunately, I can not get this to work...
//* Add support for custom header
add_theme_support( 'custom-header', array(
'header_image' => '/images/tgoc.svg',
'header-selector' => '.site-title a',
'header-text' => false,
'height' => 110,
'width' => 320,
) );
I have also actioned the following in funtions.php:
//* Enable SVG file upload
function custom_mtypes( $m ){
$m['svg'] = 'image/svg+xml';
$m['svgz'] = 'image/svg+xml';
return $m;
}
add_filter( 'upload_mimes', 'custom_mtypes' );
I know you can also insert the svg code, but my main question is where to insert this code? I would like to try and use Modernizr as well for back up.
Here is the CSS:
/* Logo, hide text */
.header-image .title-area {
padding: 0;
width: 340px;
height: 340px;
background: url(/images/logo.png);
display: block;
}
.no-svg .header-image {
// fallback
background-image: url(/images/logo.png);
}
.header-image .site-title a {
float: left;
min-height: 110px;
width: 100%;
}