Welcome to WPSO. You need to modify the Walker_Nav_Menu Class. That class is responsible for rendering the HTML menu output in first place. The theme you are using is calling the WordPress menu class, which will then output your menu.
As alexwc_ mentioned the alt attribute is for images, not for anchor tags.
So in order to maniputelate the menu output, you need to implement your own “walker”.
See:
Related Posts:
- start_lvl Ignored in Custom walker_nav_menu
- Add itemprop Schema.org Markup to li Elements in wp_nav_menu
- Add data-id attribute to child page links
- Menu Custom Data Attributes
- How can I use custom menus with a Bootstrap WordPress theme?
- how to changes mobile menu toggle breakpoint in WordPress
- dynamic php menu with hidden sub-categories only showing when the category name is clicked
- Vertical Menu for one page only
- wp nav menu without label
- Add extra markup to WP menus
- custom fields wordpress
- Why the JavaScript code is ignored from wp editor?
- Where to place PHP code that inserts (or doesn’t insert) menu item?
- Populate dropdown with Child Pages based on Parent Page chosen
- How to store data from multiple forms using ajax and php
- Adding an Avatar to the Top Nav Bar
- search and replace preword from author
- Embed html in php code
- Automatically adding new post categories to menu
- Add data attribute to each li in menu
- WP grandchild categories in nested ul li
- Use DOMDocument with ob_start breaks my HTML code
- Remove metabox from WordPress menu editor page?
- How to change redirection route to a php page for making it only accessible by logged-in members?
- Custom Walker_Nav_Menu issue with variables on PHP 7.3
- How to add an arrow to menu items has submenus
- wp_nav_menu returns menu list in ascending order. How can I arrange the menu same as dashboard menu
- selected option if current category is the value
- Unique icons next to each WordPress menu item
- Child page menu in sidebar
- How to remove ?wp-mce-4103-20162941
- Title Case WordPress Menu Items
- Customize position of social icons in upme plugin [closed]
- Why Won’t My Inputs in a form with a Get method work together?
- parts of url disappear when using # inside href=”” [closed]
- Settings API callback function inserts html quotes from nowhere
- Input data from email form not going to JSON file
- How to get the value of input hidden html from text editor to custom page template?
- Secondary navigation menu on one page
- Remove class in nav_menu_link_attibutes filter
- Different post styles depending on category
- How create a Shortcode with hover and complex options
- How do I remove the product thumbnail link from a specific div in Woocommerce? [closed]
- Dot is not added at the end of href
- WordPress Multiple Navigation bars
- Position banner to right of logo in header – messed up my header file
- WordPress Quick Question . How to Get Parent Link in Submenu in My Code
- Commenting out unwated CSS/scripts in HTML with PHP
- Trying to store submenu items to render out after main menu
- Detecting classes, adding widgets, and adding divs in with a Nav Walker
- How to separate HTML and WordPress files
- Add .htm extention to a custom taxonomy
- How to change menu order item
- Login to wordpress by clicking a link and specifying usernaname and password in url
- Auto 301 to full post permalink? (using : /archive/%post_id% to %post_name% )
- Custom Menus: dynamic highlighting problem with custom home link
- How do I add a custom css to all posts without affecting homepage css? [closed]
- get_the_title() gets printed out twice
- Make PHP work with HTML tags
- Noscript not working as it should in wordpress site
- Show latest posts in a plain HTML website custom widget [closed]
- Add item to top of menu using a filter in functions.php
- How to convert select to HTML with PHP tags inside of it [closed]
- Adding PHP in the menu
- Two menus show up
- Is this spyware on my site or a real Java update?
- Syntax error when I try to insert my loop into an unordered list? [closed]
- How to make modifications only to certain elements of an HTML string on the server-side?
- Wrapping a Sidebar within
- Search WordPress using static html page
- Hide HTML element (by class or ID) with PHP
- Add Codepen animation as Preloader to WordPress
- Path for php file for inserting data through html form
- Function returns text instead of html [closed]
- Printing HTML codes
- Register a menu – Error Header
- Widget back end radio button issue
- How to style one item from main navigation?
- HTML escaping data with ajax requests
- Show About and Contact Us page when they’re clicked in the top menu.
- How i can get post data from database when i am getting post id from url in wordpress
- How to retrieve the data from the sever and displaying it in a page?
- php within html within php
- How to execute html code inside php?
- How to remove coupon dropdown feature
- New walker for walker_nav_menu to change inside container data
- Parsing Menu Items and Blog Posts
- Add shortcode in my div
- Add login hyperlink to secondary navigation menu
- WordPress plug-in for dynamic download link?
- HTML table attributes ignored
- Automatically add images to a menu
- php esc_html_e with an html link inside not working
- Add html link in functions.php files of the theme
- Using ob_start and ob_get_clean with wordpress shortcode
- How to edit HTML of my website on WordPress? [closed]
- WordPress wp-admin redirect and exception
- How to remove the h6 tag for the entry-category Class
- Override user-edit.php to design own profile page
- wp_insert_post() with HTML tags using PHP