How to Use Meta Box Relationship Data in Slim SEO Schema

Support MB Relationships How to Use Meta Box Relationship Data in Slim SEO Schema

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #47760
    OlivierOlivier
    Participant

    Hi Meta Box team,

    I am using Meta Box Relationships to link WordPress authors (default user system) to a custom post type for Licensees. Each author is affiliated with a specific Licensee, and I want to reflect this relationship in the Schema.org markup for my blog posts, using Slim SEO Schema.

    My Setup:

    • Post Type: post (Blog posts)
    • Authors: Default WordPress user system
    • Licensees: Custom post type (licensee)
    • Relationship: Created via Meta Box Relationships (each author is related to one licensee)

    My Goal:
    I am using Slim SEO Schema to generate "Article" schema for blog posts. I want to include:

    • The author’s "Person" schema inside "Article", AND
    • Inside "Person", I want to add the related Licensee as "Organization" (affiliation).

    Expected JSON-LD Output:

    {
      "@context": "https://schema.org",
      "@type": "Article",
      "headline": "Example Blog Post",
      "author": {
        "@type": "Person",
        "name": "John Doe",
        "affiliation": {
          "@type": "Organization",
          "name": "XYZ Consulting",
          "url": "https://example.com/licensees/xyz-consulting/"
        }
      }
    }

    My Question:
    Is there a way to dynamically pull the Meta Box relationship data (related Licensee for each Author) and use it inside Slim SEO Schema?

    If Slim SEO cannot directly pull this data, is there an alternative approach within Meta Box to store the relationship dynamically in a way that Slim SEO Schema can access?

    I appreciate any guidance on the best way to achieve this! Thanks in advance. 🙏

    #47762
    PeterPeter
    Moderator

    Hello Olivier,

    I searched in the documentation but didn't see an option to show the relationship value in the schema markup. If you have any questions related to Slim SEO, please contact us here https://wpslimseo.com/contact/

    If you want to output the relationship value with code, please follow the documentation https://docs.metabox.io/extensions/mb-relationships/

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.