Add Site Verification Meta Tags
Adds Google Search Console, Bing Webmaster Tools, Yandex, and Pinterest domain verification meta tags to every page head; leave any value empty to skip that provider.
PHPby SnipCraft
php
<?php
if ( ! function_exists( 'scseed_site_verification_tags' ) ) :
function scseed_site_verification_tags() {
// Replace each string with your actual verification code; leave empty to skip.
$google = ''; // Google Search Console verification code
$bing = ''; // Bing Webmaster Tools verification code
$yandex = ''; // Yandex Webmaster verification code
$pinterest = ''; // Pinterest domain verification code
if ( $google ) {
echo '<meta name="google-site-verification" content="' . esc_attr( $google ) . '">' . PHP_EOL;
}
if ( $bing ) {
echo '<meta name="msvalidate.01" content="' . esc_attr( $bing ) . '">' . PHP_EOL;
}
if ( $yandex ) {
echo '<meta name="yandex-verification" content="' . esc_attr( $yandex ) . '">' . PHP_EOL;
}
if ( $pinterest ) {
echo '<meta name="p:domain_verify" content="' . esc_attr( $pinterest ) . '">' . PHP_EOL;
}
}
add_action( 'wp_head', 'scseed_site_verification_tags' );
endif;#google#meta#seo#verification#webmaster