To replace the text of a menu item with an image in WordPress, you can follow these steps:
- Go to Admin > Appearance > Menus.
- Open one of your menu items or create a new “Custom Link” menu item.
- Place an image HTML tag into the Navigation label input text.
- Alternatively, you can install and activate the “Menu Image” plugin.
- Go to Appearance > Menus.
- Click to expand one of the elements in your menu structure.
- You can set a background image to the menu item and hide the text using CSS.