WPML

نظرة عامة على المشكلة

عند استخدام Rank Math SEO مع WPML، لن يُترجم محتوى الكود المختصر للمقتطف المنسق الخاص بـ Rank Math [rank_math_rich_snippet id="...-2"].

حل بديل مؤقت

الخطوة 1: اجعل الحقول قابلة للترجمة

  1. اذهب إلى «WPML > إعدادات > تكوين XML مخصص».
  2. أضف ما يلي وانقر على «حفظ».
    <wpml-config>
      <custom-fields>
        <custom-field action="translate">rank_math_schema_HowTo</custom-field>
        <custom-field action="translate">rank_math_schema_Article</custom-field>
        <custom-field action="translate">rank_math_schema_SoftwareApplication</custom-field>
      </custom-fields>
      <custom-fields-texts>
        <key name="rank_math_schema_HowTo">
          <key name="name" />
          <key name="description" />
        </key>
        <key name="rank_math_schema_SoftwareApplication">
          <key name="headline" />
          <key name="description" />
          <key name="review">
            <key name="negativeNotes">
              <key name="itemListElement">
                <key name="*">
                  <key name="name" />
                </key>
              </key>
            </key>
            <key name="positiveNotes">
              <key name="itemListElement">
                <key name="*">
                  <key name="name" />
                </key>
              </key>
            </key>
          </key>
        </key>
        <key name="rank_math_schema_Article">
          <key name="headline" />
          <key name="description" />
        </key>
      </custom-fields-texts>
    </wpml-config>
  3. أجرِ تعديلاً بسيطاً على الصفحة الأصلية واحفظ.
  4. ترجم الصفحة.

الخطوة 2: اضبط الكود المختصر أو استخدم كتلة Rank Math

  • يتضمن الكود المختصر [rank_math_rich_snippet id="...-3"] معرفاً فريداً.
  • استخدم الكود المختصر [rank_math_rich_snippet] بدلاً من ذلك (بدون السمة id).
  • بدلاً من ذلك، استخدم كتلة Schema by RankMath.

جميع المشكلات المعروفة