I guess the article template default is /templates/gk_news2/html/com_content/article/default.php
So I introduce my code
- Code: Select all
// Variable para meta descripcion
$document = JFactory::getDocument();
$document->addCustomTag($headtag);
$metaDesc = $document->getMetaData('description'); //Obtiene la meta descripción ingresada en el articulo
// Variable para twittercard
$twittercard .= '<meta name="twitter:card" content="summary_large_image">' ."\n";
$twittercard .= '<meta name="twitter:site" content="@twitterEmprsa">' ."\n";
$twittercard .= '<meta name="twitter:creator" content="@twitterAutor">' ."\n";
$twittercard .= '<meta name="twitter:title" content="'.$this->item->title.'"/>' ."\n";
$twittercard .= '<meta name="twitter:description" content="'.$metaDesc.'"/>' ."\n";
$twittercard .= '<meta name="twitter:image:src" content="'."https://www.territoriosnow.com/".$images->image_fulltext.'"/>' ."\n";
I think this is a correct code because if I create a new default.php but with joomla template (/territoriosnow/components/com_content/views/article/tmpl/default.php) it works fine and twitter validates my card.
Any idea what is wrong??
Thanks