Skip to content

Instantly share code, notes, and snippets.

@paulgibbs
Last active January 28, 2018 10:11
Show Gist options
  • Save paulgibbs/6138839 to your computer and use it in GitHub Desktop.
Save paulgibbs/6138839 to your computer and use it in GitHub Desktop.
add more properties to add-meta-tags properties
<?php
function pg_filter_metatags( $tags ) {
$tags = str_replace( 'meta name="description"', 'meta name="description" itemprop="description"', $tags );
$tags = str_replace( 'meta name="keywords"', 'meta name="keywords" itemprop="keywords"', $tags );
return $tags;
}
add_filter( 'amt_metatags', 'pg_filter_metatags' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment