Hi everyone,
I'm stuck with that function, i'm triyng to get the img url from a page frontmatter image name (save with pagemediaselect)
...
foreach($header as $key => $value) {
$seofacebookimage_key = 'seofacebookimg';
if (array_key_exists('seofacebookimg', $header) ) {
if ( $key == $seofacebookimage_key && ! empty ($value) ) {
$seofacebookimage = $value;
$property = 'og:image';
$metadata[$property] = [ 'property' => $property, 'content' => $seofacebookimage ];
}
} else {
...
}
}
...
of course $value return only myimage.jpg because it's in the frontmatter, how to get the full url ? Maybe add the page url in the frontmatter and then concatenate the 2 vars ?
thanks for any tips.