- This topic has 3 replies, 2 voices, and was last updated 4 years ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘Generic’ is closed to new topics and replies.
Events Made Easy › Forums › Generic › “Ameta property=”og:type” when using extra headers filter
Tagged: eme_extra_event_headers_filter
Hi, when I use this code in m theme’s function.php
function pk_eme_extra_header($current_headers, $event) {
$performer[] = array(
"@type" => "PerformingGroup",
"name"=> "Turban Quiz",
"sameAs" => "https://panakrala.sk/turbanquiz"
);
$performer[] = array(
"@type" => "Person",
"name"=> "Matej Moško",
"sameAs" => "https://panakrala.sk/matejmosko"
);
$performer[] = array(
"@type" => "Person",
"name"=> "Jakub Lužina",
"sameAs" => "https://panakrala.sk/kuboluzina"
);
$current_headers["performer"] = $performer;
return $current_headers;
}
add_filter('eme_extra_event_headers_filter','pk_eme_extra_header', 10, 2);
On top of the page this appears::
Ameta property="og:type" content="article" />
I really don’t know how it is possible, but when I remove the code, the meta tag is not broken.
The headers argument is not an array but a string. Maybe you want the eme_extra_event_headers_json_filter filter?
Thanks, meanwhile I have found out about that. But this post was initially blocked by akismet, so I couldn’t edit/delete.
Thanks.
Indeed, I saw yesterday that some replies were blocked. I’m going to try and stop akismet from blocking posts/replies.