Want to add a custom attribute like target=”foobox” or data-featherlight=”#enews-popup” to a specific nav menu item’s anchor? nav_menu_link_attributes filter hook in WordPress is your friend. For example, adding /** * Add custom attribute and value to a nav menu item’s anchor. * * @author Sridhar Katakam * @link https://sridharkatakam.com/ */ add_filter( ‘nav_menu_link_attributes’, function ( $atts, […]
Recent Comments