Adding a Data Attribute to a Menu List Item via the Walker Class

Here is how to add a Data Attribute to a Menu List Item via the Walker Menu Class. Some of the markup of the WordPress menu is hard to filter or hook into, the Walker class allows for a full custom menu mark…
Adding Classes and Attributes to HTML elements in Genesis

Attributes can be added into various HTML markup elements via filters in the Genesis Framework, these attributes can be adding in an ID or additional CSS Class, or amending the Microdata Schema including role, itemscope or itemtype attributes. The HTML markup elements/sections…
Adding an attribute and value to a WordPress Menu Item
Recently I had to add a Bootstrap modal trigger from a WordPress Menu item, the modal trigger requires an attribute of data-toggle with a value of modal. There is no facility to add this to a Menu Item in a menu in…