如何在ElementorPro插入FAQ Schema結構化資料 - Mr. 蔡大痣數位轉型顧問 - WordPress網站技術、SEO優化、AI工具導入

文章分類/

如何在ElementorPro插入FAQ Schema結構化資料

2353 瀏覽

我們在製作版型的時候,通常會使用手風琴元件製作FAQ效果,而這個效果通常是給人類讀的。

為了讓Google爬蟲檢索時,能有效的識別FAQ的相關資訊,就可以使用FAQ Schema。

在這個AI,你只要把你的html結構貼給AI,馬上就可以生成對應的Schema。

為什麼使用Html元件無法產生結構化資料呢?

如果你使用HTML元件是無法產生這個結構得,為什麼呢?

但 Elementor 為了避免使用者插入惡意腳本,會「移除看起來無用的 <script>」,尤其是:

  • <script type="application/ld+json"> ✅(你遇到的)
  • <script type="text/ld+json">
  • <script type="text/template">
  • 其他「非 text/javascript」的 <script> 型別

➡️ 所以當你貼到「HTML 元件」後,Elementor 預覽畫面沒顯示、儲存後再打開也會被刪掉。

正確的方式!! 使用 Elementor Pro 的 Customer Code

1. 到 WordPress 後台 ➜ 點選「Elementor → Custom Code」

2. 點「Add New」命名:例如 FAQ Structured Data

3. 在輸入框中貼入





<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "Can the v-grooved slats panel be used to resurface furniture?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes, the v-grooved slats panel is popular for furniture restoration and resurfacing. Many creative DIY projects can be found on platforms like TikTok and Pinterest."
      }
    },
    ...
  ]
}
</script>

5. 在Conditions功能設定要綁定的頁面

如果我是使用WPML的多國語言網站呢?

就只能使用程式碼片段(Code )的外掛做相對應的語言處理

add_action('wp_footer', function () {
  if ( function_exists('icl_object_id') && defined('ICL_LANGUAGE_CODE') && ICL_LANGUAGE_CODE === 'en' ) {
    ?>
    <script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "FAQPage",
      "mainEntity": [ /* 你的英文 FAQ JSON 內容 */ ]
    }
    </script>
    <?php
  }
});

語言名稱語言代碼(ICL_LANGUAGE_CODE)
繁體中文zh-hant
簡體中文zh-hans
英文en
日文ja
韓文ko
法文fr
德文de
西班牙文es
義大利文it
越南文vi
泰文th
印尼文id
荷蘭文nl
葡萄牙文(巴西)pt-br
葡萄牙文(歐洲)pt
俄文ru
阿拉伯文ar
希臘文el
土耳其文tr
波蘭文pl
匈牙利文hu

✦ 虎鯨 OrcaBiz SEO 優化專業團隊 ✦

專業 SEO 公司幫助你將流量累積成看得見的業績,成為長期有效的最強業務!

載入中…
沒有更多相關文章可閱讀