Hi
I having trouble with the Card Validator;
ERROR: Required meta tag missing (twitter:description)
Header:
<?php
#twitter cards
if(is_single() || is_page()) {
$twitter_url = get_permalink();
$twitter_title = get_the_title();
$twitter_desc = get_the_excerpt();
$twitter_thumbs = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), full );
$twitter_thumb = $twitter_thumbs[0];
if(!$twitter_thumb) {
$twitter_thumb = 'http://img4.hostingpics.net/pics/468218favicon.png';
}
$twitter_name = str_replace('@', '', get_the_author_meta('twitter'));
?>
<meta name="twitter:card" value="summary_large_image" />
<meta name="twitter:url" value="<?php echo $twitter_url; ?>" />
<meta name="twitter:title" value="<?php echo $twitter_title; ?>" />
<meta name="twitter:description" value="<?php echo $twitter_desc; ?>" />
<meta name="twitter:image" value="<?php echo $twitter_thumb; ?>" />
<meta name="twitter:site" value="@TodayviewTweet" />
<?
if($twitter_name) {
?>
<meta name="twitter:creator" value="@<?php echo $twitter_name; ?>" />
<?
}
}
?>
I can’t see what’s wrong
PS: I’m on Wordpress with Griffin theme using the following in fonction.php:
// custom excerpt
function new_excerpt_more($more) {
global $post;
return '... <p><a class="teaser-more" href="'. get_permalink($post->ID) . '">' . 'Read more' . '</a></p>';
}
add_filter('excerpt_more', 'new_excerpt_more');
Website http://todayview.ovh/
Thanks for your support