Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook Open-graph Tag for multiple authors in Wordpress

I've been trying to add facebook article:author metatag to wordpress, unfortunately I have no idea how to add it for multiple authors. This is what I've done so far and still the author's name doesn't show up in the facebook shares.

<meta property="article:author" content= "<?php $author = get_the_author(); ?>" />
like image 400
Smith Avatar asked Dec 01 '25 02:12

Smith


1 Answers

According to https://developers.facebook.com/docs/reference/opengraph/object-type/article#properties the article:author contains

An array of Facebook profile URLs or IDs of the authors for this article.

As of https://developers.facebook.com/docs/opengraph/creating-custom-stories/#propertytypes-simple

You define an array value by repeating the same meta tag name for each element of the array.

Example

<meta property="cookbook:ingredients" content="Chocolate"> 
<meta property="cookbook:ingredients" content="Sugar"> 
<meta property="cookbook:ingredients" content="Butter"> 

Make sure you define

<meta property="og:type" content="article" /> 

as well.

like image 200
Tobi Avatar answered Dec 03 '25 17:12

Tobi