• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Possible to replace mobile menu icons with SVGs?

Welcome!

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.

Log In
Register Lost Password

Community Forums › Forums › General Genesis Framework Discussions › Possible to replace mobile menu icons with SVGs?

This topic is: not resolved

Tagged: Icons, mobile menu, SVG

  • This topic has 3 replies, 2 voices, and was last updated 1 year, 7 months ago by Victor Font.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • August 22, 2021 at 2:28 pm #504406
    msb8s
    Participant

    Is there a clean way to use SVG icons for the menuIconClass and subMenuIconClass entries in responsive-menus.php?

    August 23, 2021 at 7:57 am #504408
    Victor Font
    Moderator

    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/


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    August 24, 2021 at 8:44 pm #504414
    msb8s
    Participant

    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).

    August 28, 2021 at 6:03 am #504423
    Victor Font
    Moderator

    You just need to create your own classes for the SVG icons and reference those classes in the script instead of dashicons.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Log In

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble