Sure, this:
$title = "The Page Title";
$img = "title-card";
$desc = "Page description...";
$metatags = array(
"title" => $title,
"relation" => array("firstimage" => "wiki:<?=$img>.png"),
"description" => array("abstract" => $desc)
);
p_set_metadata($ID, $metatags, True, False);
Results in this:
<meta name="twitter:title" content="The Page Title">
<meta name="twitter:description" content="Page description...">
<meta name="twitter:image" content="https://.../_media/wiki/title-card_.png">
I also just discovered a workaround...if I create a separate variable for the image path and reference that instead of how I'm currently doing it, there is no underscore.
So something is appears to be happenin`g between p_set_metadata and the page rendering.
Also: is there a way to force a large image on socmedia cards? i.e. "twitter:card" = "summary_large_image"
If I try to do this through addMetaKeys
, the entire page breaks and stops rendering before addMetaKeys
is first referenced.