How to implement my own icons instead of using the svg icon system

You could replace the function that is getting the svg image like so: <nav class=”social-navigation” role=”navigation” aria-label=”<?php esc_attr_e( ‘Footer Social Links Menu’, ‘twentyseventeen’ ); ?>”> <?php wp_nav_menu( array( ‘theme_location’ => ‘social’, ‘menu_class’ => ‘social-links-menu’, ‘depth’ => 1, ‘link_before’ => ‘<span class=”screen-reader-text”>’, ‘link_after’ => ‘</span><img src=”‘.get_home_url().’/path/to/image.png”>’, ) ); ?> </nav><!– .social-navigation –>

SVG image upload stopped working

By default, WP does not allow SVG uploads, and you should get that error. Preventing SVG uploads is a security feature (which I explain below). I can’t help you debug your function, because that is beyond my expertise, but I can suggest a work around. You can use a plugin like SafeSVG (https://wordpress.org/plugins/safe-svg/) to enable … Read more

use of tag into wordpress

I think that WordPress currently not allow the svg tag in his editor. But you can change this, see this answer for more hints, background. I think the follow small source should help you to allow this tag and his attribute. Copy in a plugin (add a plugin header) and activate. But I think, that … Read more

Stylizing external SVG files with jQuery and CSS

Sorry to say, but it’s not possible, because none of the elements from the SVG are read in the DOM, so CSS and Javascript don’t see them. All it sees is the <img> block, none of its contents. You have to import your SVGs into the page to have them be able to be manipulated. … Read more

Adding extra SVGs to TwentyNineteen child theme using class TwentyNineteen_SVG_Icons

Ok, this is what I did: First, I replicated classes/class-twentynineteen-svg-icons.php to the child theme. Renamed to class-mytheme-svg-icons.php. Added a extend with my New_SVG_Icons class: class New_SVG_Icons extends TwentyNineteen_SVG_Icons { /** * Gets the SVG code for a given icon. */ public static function get_svg( $group, $icon, $size ) { if ( ‘ui’ == $group ) … Read more

getting uploaded SVG dimensions on front-end

I agree with Tom J Nowell on the use of SVG, but if the upload is an actual image, you can tap into the attachment attributes using, as you suggested, wp_get_attachment_image_src. Those dimensions are actually already recorded and stored when using the WP media uploader, it’s likely that the plugin you’re using makes use of … Read more