What is the best way to modify the
<header> element on all pages? I need to edit the
<header> element on every page from:
<header class="light" itemscope="itemscope" itemtype="http://schema.org/WPHeader">
and I would like it to read Is there a way to do this via a custom function? I know I can directly edit
my header.php file, but I'd like to avoid that.
Perhaps there a WordPress filter hook that can modify the element for each page of my site? I looked through the WP list of filter hooks, but didn't see anything that would be relevant in this case. I may have missed it though.
The objective of this task is to add schema data, in microdata format, to my site (per the instructions on this page). If there is an easier/better method I would be interested in hearing about it. In the past I've added schema data, in JSON format, using Google Tag Manager. But in that case I had a JSON-LD file already prepared for me. In this particular case I can't figure out how to prepare that file.