How do I edit the tag without using the deprecated wp_title()
function? I need to add a microdata parameter - itemprop="name"
-, as seen in the example below:
<head itemscope itemtype="http://schema.org/WebSite">
<title itemprop="name">Your WebSite Name</title>
<link rel="canonical" href="https://example.com/" itemprop="url">
The is injected using theme support.
Note 1: All the custom hooks provided by WordPress allow for title content manipulation only, not the tag itself.
Note 2: This is not a duplicate of Custom attribute for the title tag with wp_title() as the accepted answer does not function anymore.
<title>
solution would work best for me.