js image size error
-
Hi,
Just installed your plugin to add svg’s to my Divi site, having a play around with what is the best option to export form photoshop at the moment (don’t have illustrator)
Any-how, when i turn on the advanced settings i get a js error relating to image dimensions
error:
custom.js:1219 Uncaught TypeError: Cannot read property ‘substr’ of undefined
at Image.et_define_logo_dimension [as onLoad] (custom.js:1219)custom js:
// Detect actual logo dimension, used for tricky fixed navigation transition
function et_define_logo_dimension() {
var $logo = $(‘#logo’),
logo_src = $logo.attr( ‘src’ ),
is_svg = logo_src.substr( -3, 3 ) === ‘svg’ ? true : false,
$logo_wrap,
logo_width,
logo_height;i have added the following to the functions.php, but does not change anything
add_action( ‘after_setup_theme’, ‘bodhi_svg_theme_support’, 11 );
function bodhi_svg_theme_support() {remove_theme_support( ‘custom-logo’ );
add_theme_support( ‘custom-logo’, array(
‘flex-width’ => true,
‘flex-height’ => true,
) );}
Am i missing something?
Additionally when the svg is loaded as a logo into the header, it’s position is not in the default Divi location, it appears to be that the text within the logo is positioned in the center of the logo canvas/ viewbox. If i change the width of the logo the text moves to the left.
Any ideas what is happening here and how can i get logo/text to sit in the default Divi location
Thank you
Tony.
The page I need help with: [log in to see the link]
- The topic ‘js image size error’ is closed to new replies.