Header image in Internet Explorer
-
Hi!
I have in my header images svg files, which are ok in Safari, Chrome and Mozilla. But they’re not visible in Internet Explorer. How can I replace this files with jpeg images just for IE?
My site: https://hercogdesign.euThe page I need help with: [log in to see the link]
-
Does this help: https://ww.wp.xz.cn/plugins/add-full-svg-support/
Thank you, I’ll try this. Works also in IE?
Yes
I saw that all my svg header images are imported by Full svg support plugin. But still doesn’t work on IE. Do I have to put the code directly in php file? I’m not a developer and I don’t know where and how to put them. I can just redesign the page with css. Is there an option that I can do with css and replace those images with jpg just for IE? Also my website is not responsive for IE. Images getting scale proportionaly and have a grey part around the image header.
Can I ask which version of IE are you having issues with? IE11 should load SVG fine, so if you’re having issues with that version it might point to a different problem.
I have 10 and 11, tried on different computers, but it doesn’t work.. I imported that images as svg files and put them in header. In Safari, Chrome and Mozila works fine.
It’s a problem with the SVG file being used. That plugin I recommended was only for browsers that don’t support SVG – but you’re having an issue with a browser that supports SVG but for some reason the animation you’re using isn’t compatible.
I assume you created this animation using another tool outside of ww.wp.xz.cn? If so, can you ask for their support to see what they can do to get their tools compatible with IE?
I don’t see an easy way for you to upload separate header images for IE when you’re not a developer. Is hiring someone an option?
I think I see an easier way of swapping the SVG image out for IE and I can help you with that, but it will involve getting your hands dirty with code. Are you okay with trying?
Ok, great, thanks, I’m fine to get dirty hands π
- First step is to create a Child Theme: https://codex.ww.wp.xz.cn/Child_Themes#How_to_Create_a_Child_Theme
- Put your IE image into your Child Theme folder and name it “banner-for-ie.jpg”
- Inside your Child Theme create a folder named ‘template-parts’
- Inside ‘template-parts’ create a folder named ‘header’
- Inside ‘header’ folder create a new file named ‘header-image.php’
- Copy all of the code from this PasteBin page: https://pastebin.com/FrMF4Pvb – and paste it inside inside ‘header-image.php’ file
Does that work?
-
This reply was modified 8 years, 4 months ago by
Andrew Nevins.
-
This reply was modified 8 years, 4 months ago by
Andrew Nevins.
-
This reply was modified 8 years, 4 months ago by
Andrew Nevins. Reason: Updated pastebin
Thank you, Andrew! I made a child theme and all things like you suggested, only that I didn’t test on IE, because I don’t know if it safe to already activate a child theme. Cos now I see that my header image is static (jpg, not svg) also on Safari. Will that change if I activate that child theme? Or shoul I use another code?
Hmm if you not activated the Child theme then it shouldn’t have caused Safari to change and show the static image.
Just to clarify, have you made changes only to files inside of your Child Theme?
I also copied other files in that child theme folder. Maybe I shouldn’t. Now, when I deleted them, I put my parent header image (svg) and that’s ok. You think if I activate now, will be ok?
Oh, and now, when I add header image (svg), it’s static again π
Maybe some files must be copied anyway?There’s no need to copy files from the theme into your Child Theme. Creating a Child Theme is a manual process of adding a folder (for your Child Theme), a style.css file and a functions.php file.
Try getting to this stage and then activating your Child Theme in the dashboard, before doing any of the other steps. It’s just difficult to understand why your images are disappearing and turning static when all you’re doing is creating a Child Theme.
The topic ‘Header image in Internet Explorer’ is closed to new replies.
