- This topic has 3 replies, 2 voices, and was last updated 10 months ago by .
- You must be logged in to reply to this topic.
These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.
Is there a clean way to use SVG icons for the menuIconClass and subMenuIconClass entries in responsive-menus.php?
WordPress doesn't support SVGs natively, but I use SVG images and icons wherever I can in my WordPress sites. I use this plugin to add SVG support: https://wordpress.org/plugins/svg-support/
Thanks, Victor. There's a lot of good information there.
I'm actually trying to find out if there is a way to reference an SVG icon through the configuration/responsive-menus.php script. I'm looking at the genesis Sample theme specifically, but assume other recent Genesis themes use the similiar configuration.
The script returns an array (not full code):
$settings = array(
'mainMenu' => __( 'Menu', 'genesis-sample' ),
'menuIconClass' => 'dashicons-before dashicons-menu',
'subMenu' => __( 'Submenu', 'genesis-sample' ),
'subMenuIconClass' => 'dashicons-before dashicons-arrow-down-alt2',
Since they are referred to by classnames, it appears that using icon fonts is the only way to reference icons. I was hoping that there was a way to reference SVG icons.
I was looking icons in Genesis since WordPress announced the move use the Icon Component (see https://wptavern.com/wordpress-dashicons-project-to-discontinue-development-in-favor-of-new-icon-component).
© 2022 WPEngine, Inc.