Events Made Easy Forums Generic “Ameta property=”og:type” when using extra headers filter

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #61107
    Anonymous
    Inactive

    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.

    #61113
    Franky
    Keymaster

    The headers argument is not an array but a string. Maybe you want the eme_extra_event_headers_json_filter filter?

    #61124
    Anonymous
    Inactive

    Thanks, meanwhile I have found out about that. But this post was initially blocked by akismet, so I couldn’t edit/delete.

    Thanks.

    #61125
    Franky
    Keymaster

    Indeed, I saw yesterday that some replies were blocked. I’m going to try and stop akismet from blocking posts/replies.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Generic’ is closed to new topics and replies.
Scroll to Top