• Resolved Texiwill

    (@texiwill)


    Hello,

    I recently tried to add a global meta to the dialog on the settings page and while is showed up, Google Structured Data Tool did not pick it up, as I force JSON+LD. So I added the following to my code:

    // add-meta-tags publisher add LinkedIn, YouTube
    function my_publisher_extra($metadata_arr) {
            $metadata_arr['sameAs'][] = 'linkedin link';
            $metadata_arr['sameAs'][] = 'youtube link';
            return $metadata_arr;
    }
    add_filter('amt_jsonld_schemaorg_publisher_extra','my_publisher_extra');

    Now Google Structure Data Tool sees everything. The example in the guide (https://www.codetrax.org/projects/wp-add-meta-tags/wiki/Common_Metadata_Customization_Recipes) shows using meta tags not JSON+LD.

    It would be great if the social media links could be extended to at least include Youtube, Pinterest, and LinkedIn. It would be ideal if we could add our own to the list. Sort of a global dialog that shows up as sameAs within JSON+LD.

    – Edward

    https://www.ads-software.com/plugins/add-meta-tags/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author George Notaras

    (@gnotaras)

    Hey Edward,

    Thanks for your feedback. This code is exactly the way to do it.

    The number of supported social networks has been kept to a minimum according to what is required by the meta tags of the metadata generators the plugin supports.

    If I started adding more, requests for even more networks would keep on coming from users, so this would be a problem for me. I wouldn’t know which requests to satisfy! ??

    However, the addition of extra contact fields in the user profile for the aforementioned networks is not difficult. And this is actually a very nice idea for a customization example, which I’ll add shortly and let you know about it.

    George

    Plugin Author George Notaras

    (@gnotaras)

    OK, found some time to write the example, but..

    However, the addition of extra contact fields in the user profile for the aforementioned networks is not difficult. And this is actually a very nice idea for a customization example, which I’ll add shortly and let you know about it.

    …oops, just noticed that you refer to publisher profile URLs, so the addition of contact methods in the user profile is irrelevant..

    In case of the publisher setting, since they exist in the plugin options, the addition of extra fields would require more complicated work. So, for the time being, the only way to add these profile URLs is at run time via filtering as you have already posted.

    Regarding authors, the addition of extra contact methods for extra profile URLs is easy. I’ve added a complete example at the end of the page you mentioned. A few remarks:

    1. There is a function that adds the contact methods.
    2. There are functions that generate both schema.org microdata and json+ld data.
    3. The author id has to be calculated inside the filtering functions. Ideally it should be passed to the filtering functions by the plugin. I’ve taken a note to make this modification for the next release.

    George

    Plugin Author George Notaras

    (@gnotaras)

    An updated example has been added in the aforementioned wiki page. The $author_id is now passed to the filtering functions in order to make customization easier.

    Plugin Author George Notaras

    (@gnotaras)

    BTW, I’ve added a note in my bug tracker about the addition of a snippet that extends the Organization’s JSON-LD schema.org properties, because currently there is only a snippet about adding microdata. This will be done soon.

    I’ll also do some research in the plugin repository about plugins that generate schema.org metadata for organizations or local businesses and see how it would be possible to link the Schema.org entities.

    The progress about this will be listed in the changelog entries. Suggestions are always very welcome.

    George

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Youtube, LinkedIn, others Missing’ is closed to new replies.