Reply to thread

Nice to see this thread going forward.


Just coded this profile page markup as per Google guidelines. Had to remove some stuff, but it's a start.


Template name: member_view, replace old schema around line 16.

[CODE]

<xf:page option="ldJsonHtml">

    <script type="application/ld+json">

    {

      "@context": "https://schema.org",

      "@type": "ProfilePage",

      "dateCreated": "{{ date($user.register_date, 'c')|raw }}",


      "mainEntity": {

        "@type": "Person",

        "name": "{$user.username|escape('json')}",

        "identifier": "{$user.user_id|escape('json')}",

        "interactionStatistic": [

          {

            "@type": "InteractionCounter",

            "interactionType": "https://schema.org/LikeAction",

            "userInteractionCount": "{$user.like_count|escape('json')}"

          }

        ],

        "agentInteractionStatistic": {

          "@type": "InteractionCounter",

          "interactionType": "https://schema.org/WriteAction",

          "userInteractionCount": "{$user.message_count|escape('json')}"

        },

         "description": "{$user.Profile.about|default('')|escape('json')}",

        "image": "{$user.getAvatarUrl('o', null, true)|escape('json')}"

      }

    }

    </script>

</xf:page>[/CODE]


Back
Top Bottom