สอบถามการทำ Google Structure (โชว์ content ให้ตรงตามรูปแบบเนื้อหา)

พูดคุยแลกเปลี่ยน ปัญหา การเขียน JavaScript เครื่องมือ AJAX Web 2.0 AJAX Framework jQuery และ Node.JS รวมถึง Framework Express ของ Node.JS ทำงานฝั่ง Server

Moderator: mindphp

flook
PHP VIP Members
PHP VIP Members
โพสต์: 3751
ลงทะเบียนเมื่อ: 06/06/2022 9:43 am

สอบถามการทำ Google Structure (โชว์ content ให้ตรงตามรูปแบบเนื้อหา)

โพสต์ที่ยังไม่ได้อ่าน โดย flook »

สอบถามเรื่องวิธีการเขียน และ set ค่า การทำ Google Structure (โชว์ content ให้ตรงตามรูปแบบเนื้อหา)
พอมีตัวอย่างให้ดูไหมครับ
ภาพประจำตัวสมาชิก
mindphp
ผู้ดูแลระบบ MindPHP
ผู้ดูแลระบบ MindPHP
โพสต์: 41232
ลงทะเบียนเมื่อ: 22/09/2008 6:18 pm
ติดต่อ:

Re: สอบถามการทำ Google Structure (โชว์ content ให้ตรงตามรูปแบบเนื้อหา)

โพสต์ที่ยังไม่ได้อ่าน โดย mindphp »

ตัวอย่างถ้าเป็น เว็บบอร์ด จะเป็น Q&A คือมีเนื้อหาในการถามตอบ
ตัวอย่างโค้ด

โค้ด: เลือกทั้งหมด

<html>
  <head>
    <title>How many ounces are there in a pound?</title>
    <script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "QAPage",
      "mainEntity": {
        "@type": "Question",
        "name": "How many ounces are there in a pound?",
        "text": "I have taken up a new interest in baking and keep running across directions in ounces and pounds. I have to translate between them and was wondering how many ounces are in a pound?",
        "answerCount": 3,
        "upvoteCount": 26,
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "1 pound (lb) is equal to 16 ounces (oz).",
          "upvoteCount": 1337,
          "url": "https://example.com/question1#acceptedAnswer"
          },
        "suggestedAnswer": [
          {
            "@type": "Answer",
            "text": "Are you looking for ounces or fluid ounces? If you are looking for fluid ounces there are 15.34 fluid ounces in a pound of water.",
            "upvoteCount": 42,
            "url": "https://example.com/question1#suggestedAnswer1"
          }, {
            "@type": "Answer",
            "text": " I can't remember exactly, but I think 18 ounces in a lb. You might want to double check that.",
            "upvoteCount": 0,
            "url": "https://example.com/question1#suggestedAnswer2"
          }
        ]
      }
    }
    </script>
  </head>
  <body>
  </body>
</html>
ผลที่ได้
qa-example-screenshot.png
qa-example-screenshot.png (24.65 KiB) Viewed 659 times
ตัวอย่างกระทู้ที่เกี่ยวข้อง (ตัวอย่างเป็น Joomla)
viewtopic.php?f=86&t=42640

อ้างอิง
https://developers.google.com/search/do ... ata/qapage
ติดตาม VDO: http://www.youtube.com/c/MindphpVideoman
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
ตอบกลับโพส

ผู้ใช้งานขณะนี้

สมาชิกกำลังดูบอร์ดนี้: Google Adsense [Bot] และบุคลทั่วไป 75