Last active
July 21, 2016 21:20
-
-
Save cliffordp/b8055fc5cfd9d9bf9298c93e3d84090c to your computer and use it in GitHub Desktop.
Add meta description to The Events Calendar Month view
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// From https://gist.github.com/cliffordp/b8055fc5cfd9d9bf9298c93e3d84090c | |
// Add meta description to The Events Calendar Month view | |
// additional reference: https://support.google.com/webmasters/answer/79812 | |
function cliff_add_meta_desc_month_archive() { | |
if ( ! is_post_type_archive( 'tribe_events' ) || ! function_exists( 'tribe_is_month' ) ) { | |
return; | |
} | |
if ( tribe_is_month() ) { | |
echo '<meta name="description" content="Whatever you want"/>' . PHP_EOL; | |
} | |
return; | |
} | |
add_action( 'wp_head', 'cliff_add_meta_desc_month_archive' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment