How to add SVG images without a plugin
SVG stands for Scalable Vector Graphics.
This means they dont get pixelated, doesn’t matter how big or small you want to make them, you will never see a pixel in them.
It’s not recommended to use it for large graphics, just keep it for logos and icons.
SVG graphics are made of HTML code and can be styled with CSS. Also they can be animated.
No one creates SVG directly with code, you can use programs like Adobe Ilustrator, but behind the scenes is all code.
The next HTML code creates a basic SVG circle, Example:
Let's see how to add them
Open up your Child Theme functions.php. If you don't have a Child Theme yet I recommend to create one using this guide
Let's paste this code, be sure the code is wrapped around the the php open and close tags of the functions.php file.
You are done and ready
Start uploading SVG to the WordPress gallery and using them, forget about plugins with this simple snippet :-).
The Force needs new lightsabers! If you enjoy my content and want to support me here is the place 😀
Want to boost your site performance? Learn how to do it by activating caching in your site. With a simply and clean plugin and as always in a couple of minutes. Let’s not forget about the small extra for fixing Google Analytics!.
Want to learn how to make any Section / Row / Module fixed? So whenever you scroll the element stays in there with you! Learn how to achieve this trick in a couple of minutes with R2D2 help!.
Hello everyone, is time to talk about how can you clean your WordPress site for a better maintenance, optimization and security purposes in just a couple of minutes once again!
Follow MasterDivi on Facebook
Be updated with the latest tricks!