XF 2.0 Inserting schema markup for specific threads

djbaxter

in memoriam 1947-2022
See https://developers.google.com/search/docs/data-types/qapage#content-guidelines

Q&A Pages are web pages that contain data in a question and answer format, which is one question followed by its answers. For content that represents a question and its answers, you can mark up your data with the schema.org QAPage, Question, and Answer types.

Content guidelines
  • Only use the QAPage markup if your page has information in a question and answer format, which is one question followed by its answers.
  • Users must be able to submit answers to the question. Don't use QAPage markup for content that has only one answer for a given question with no way for users to add alternative answers. Here are some examples:

    Valid use cases:
    • A forum page where users can submit answers to a single question

How would I go about inserting schema markup for specific threads that meet the Q and Q criteria?
 
  • Like
Reactions: Gri
Though I haven't looked in detail, since you can do this via JSON-LD, you can see how we output that for normal threads in thread_view. You'd need to modify that as and when to include the data you need.

This is probably best done through an add-on I think.
 
Top Bottom