How to add an icon to WordPress Menu

preview_player
Показать описание
Learn how to add a Cart icon to WordPress Menu. You can use this technique to add icons to menus in WordPress header, sidebar or footer. You can also include the text in the label and add icons to left or right of label.

Does this work in all themes?
I am using the GeneratePress theme, but this should work the same in most themes. Leave a comment if you have any queries.

Why is this important?
Adding an icon is pleasing visually and takes up less space.

How can we make the icon accessible?
While an icon can be understood by most people, when you add one without text, it may not be accessible to the visually impaired.
I can paste the icon code and include the text.
To make it accessible, I chose to include the title attribute which can be understood by search engines and screen readers.

Where can I find suitable icons that can be modified to suit my needs?
You can customise the icon size, line width (stroke) and colour.

TUTORIAL PAGE
---------------------------

WORDPRESS 101 SERIES
-----------------------------------------
This post is part of WordPress 101 Series. These tutorials are meant to be a starter for WordPress newbies.

CONNECT WITH ME
---------------------------------

Рекомендации по теме