fbpx

How to Add Itemprop Attributes to WordPress Menu Items

Sometimes the output generated by WordPress for menu items just isn’t enough. Sometimes we need to add additional attributes, such as schema.org’s itemprop or data- attributes. Below is a snippet that adds itemprop='url' to each of the menu’s anchor tags.

1 thought on “How to Add Itemprop Attributes to WordPress Menu Items”

Leave a Comment

Your email address will not be published. Required fields are marked *

GOT A PROJECT? LET’S TALK!

Are you ready to get your work out to the world?