advanced taxonomies

#751969
  • Resolved Anonymous
    Rank Math free

    hi, i want to setup auto vcard markup for Persons category only
    here is my code:

    {
    “@type”: “h-card”,
    “uid”: “%id%”,
    “fn”: “%title%”,
    “n”: {
    “given-name”: “John”, //MANUAL
    “additional-name”: “Kami”,//MANUAL
    “family-name”: “Doe”//MANUAL
    },
    “photo”: “%post_thumbnail%”,
    “category”: “%categories%”,
    “sex”: “woman”, //MANUAL
    “job-title”:”SMM”, //MANUAL
    “url”: “%url%”,
    “bday”: “1991-04-30”, //MANUAL
    “org”: “Example Company” //MANUAL
    }

    i want to set up “sex” manually too, so i found %tags(limit=1&separator= | &exclude=12,23)%

    i have SO MANY taxonomies, so i cant exclude all… (categories and tags) I CAN USE SOMETHING LIKE THIS? :
    %tags(limit=1&separator= | &INCLUDE=56,57)%
    so i can use only tags with ID 56(man) and 57(woman) ?
    if attached tag man = “sex”: “man” ?

    thank you very much

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    I apologize for the issue you are facing. Thank you for providing the code snippet for setting up auto vCard markup for the Persons category.

    To set up the “sex” field manually based on specific tags with IDs 56 (man) and 57 (woman), you can use the following variables in your code:

    For “sex”:

    • %tags(limit=1&separator= | &include=56,57)%

    This variable will include only tags with IDs 56 and 57 in the “sex” field. You can then manually assign the values “man” and “woman” to these tags accordingly.

    Here is how you can update your code snippet:

    {
      "@type": "h-card",
      "uid": "%id%",
      "fn": "%title%",
      "n": {
        "given-name": "John",
        "additional-name": "Kami",
        "family-name": "Doe"
      },
      "photo": "%post_thumbnail%",
      "category": "%categories%",
      "sex": "%tags(limit=1&separator= | &include=56,57)%",
      "job-title": "SMM",
      "url": "%url%",
      "bday": "1991-04-30",
      "org": "Example Company"
    }

    By using the updated variable, you can ensure that only tags with IDs 56 and 57 are included in the “sex” field as per your requirement.

    If you have any more questions or need further assistance, please feel free to ask. Thank you for reaching out.

    Sources:
    Configuring “Schema Markup” in Rank Math » Rank Math
    How to Use Rank Math’s Custom Schema Generator » Rank Math
    How to Use Schema Templates in Rank Math PRO » Rank Math
    How to Configure Sitemaps in Rank Math – Best Settings and Tips

    Anonymous
    Rank Math free

    no, how to ignore all tags and use only tags with ID 56,57 ?

    Hello,

    Unfortunately, the “include” parameter is not available on our %tags% variable.

    In this case, you may create a custom variable to retrieve those tags’ IDs only.

    Here’s a guide you can follow:
    https://rankmath.com/kb/variables-in-seo-title-description/#how-to-add-custom-variables

    Hope that helps.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

The ticket ‘advanced taxonomies’ is closed to new replies.