SVG images are uploading, but do not appear in source code
-
My client’s site is running WordPress 5.8.3 and SVG Support 2.4.2. I have created an Advanced Custom Field’s image field using ‘image array’ as the return format. This field has been assigned to menu items and is used to to display social media icons beside the menu items. The icons were being properly displayed on the menu items prior to version 2.4, but no longer work.
I have tried adding ‘style-svg’ to CSS setting on the menu item, but no success.
I have also tried setting a defined width and height in the SVG files, but still no success.
The menu items are being rendered with the following code in the theme:
$args = array( 'theme_location' => 'social-links-navigation', 'menu_id' => 'social-links-navigation', 'container' => false, 'echo' => false, 'items_wrap' => '%3$s', 'depth' => 0, ); echo strip_tags(wp_nav_menu( $args ), '<a><span><img>' ); // Tested with the following too, but not success echo wp_nav_menu( $args );
Any ideas on why this is not working?
Cheers,
- The topic ‘SVG images are uploading, but do not appear in source code’ is closed to new replies.