{"id":31482,"date":"2025-07-27T22:22:38","date_gmt":"2025-07-27T19:22:38","guid":{"rendered":"https:\/\/flashy.app\/?p=31482"},"modified":"2025-07-27T22:23:12","modified_gmt":"2025-07-27T19:23:12","slug":"%d7%94%d7%98%d7%9e%d7%a2%d7%aa-%d7%91%d7%99%d7%a7%d7%95%d7%a8%d7%95%d7%aa-%d7%a2%d7%9d-google-search-shopify","status":"publish","type":"post","link":"https:\/\/flashy.app\/he\/help\/%d7%91%d7%99%d7%a7%d7%95%d7%a8%d7%95%d7%aa\/%d7%94%d7%98%d7%9e%d7%a2%d7%aa-%d7%91%d7%99%d7%a7%d7%95%d7%a8%d7%95%d7%aa-%d7%a2%d7%9d-google-search-shopify\/","title":{"rendered":"\u05d4\u05d8\u05de\u05e2\u05ea \u05d1\u05d9\u05e7\u05d5\u05e8\u05d5\u05ea \u05e2\u05dd Google Search &#8211; Shopify"},"content":{"rendered":"\n<p>\u05d0\u05d9\u05da \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05e7\u05d5\u05d3 \u05e7\u05d8\u05df (Liquid) \u05e9\u05d9\u05d0\u05e4\u05e9\u05e8 \u05dc\u05d2\u05d5\u05d2\u05dc \u05dc\u05e1\u05e8\u05d5\u05e7 \u05d0\u05ea \u05d4\u05d1\u05d9\u05e7\u05d5\u05e8\u05d5\u05ea \u05d0\u05e6\u05dc\u05db\u05dd \u05d1\u05d0\u05ea\u05e8 \u05d5\u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05dc\u05db\u05dd \u2b50\ufe0f\u2b50\ufe0f\u2b50\ufe0f\u2b50\ufe0f\u2606 (23) \u05d1\u05ea\u05d5\u05e6\u05d0\u05d5\u05ea \u05d7\u05d9\u05e4\u05d5\u05e9 &#8211; \u05d6\u05d4 \u05d9\u05db\u05d5\u05dc \u05dc\u05e2\u05d6\u05d5\u05e8 \u05dc\u05e9\u05e4\u05e8 \u05d0\u05ea \u05d9\u05d7\u05e1 \u05d4\u05d4\u05e7\u05dc\u05e7\u05d4 \u05d0\u05dc\u05d9\u05db\u05dd \u05d5\u05dc\u05e9\u05e4\u05e8 \u05d0\u05ea \u05de\u05d9\u05e7\u05d5\u05de\u05db\u05dd \u05ea\u05d5\u05e6\u05d0\u05d5\u05ea \u05d4\u05d7\u05d9\u05e4\u05d5\u05e9.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2>\u05d0\u05d9\u05e4\u05d4 \u05de\u05de\u05e7\u05de\u05d9\u05dd?<\/h2>\n\n\n\n<p>\u05d9\u05e9 \u05dc\u05d4\u05d9\u05db\u05e0\u05e1 \u05dc\u05e2\u05d5\u05e8\u05da \u05d4\u05ea\u05d1\u05e0\u05d9\u05d5\u05ea \u05d1 Shopify \u05e9\u05dc\u05db\u05dd \u05d5\u05dc\u05e2\u05e8\u05d5\u05da \u05d0\u05ea \u05d4\u05e2\u05de\u05d5\u05d3 <code>theme.liquid<\/code> \u05dc\u05de\u05e7\u05dd \u05d0\u05ea \u05d4\u05e7\u05d5\u05d3 \u05de\u05e2\u05dc \u05dc\u05ea\u05d2\u05d9\u05ea \u05e1\u05d2\u05d9\u05e8\u05d4 &lt;\/head><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2>\u05d4\u05e7\u05d5\u05d3 \u05e2\u05e6\u05de\u05d5 \u05e9\u05dc Google Search<\/h2>\n\n\n\n<p>\u05d4\u05e2\u05ea\u05d9\u05e7\u05d5 \u05d5\u05d4\u05d3\u05d1\u05d9\u05e7\u05d5 \u05d0\u05ea \u05d4\u05e7\u05d5\u05d3 \u05d4\u05d6\u05d4 \u05d1\u05de\u05d9\u05e7\u05d5\u05dd \u05e9\u05e6\u05d9\u05d9\u05e0\u05d5 \u05de\u05e2\u05dc\u05d4.<\/p>\n\n\n\n<pre class=\"wp-block-code line-numbers language-html\"><code>{% if request.page_type == 'product' and product.metafields.flashy.avg_rating and product.metafields.flashy.reviews_count %}\r\n&lt;script>\r\n  document.addEventListener(\"DOMContentLoaded\", function () {\r\n    const ratingValue = {{ product.metafields.flashy.avg_rating | round: 1 }};\r\n    const reviewCount = {{ product.metafields.flashy.reviews_count }};\r\n\r\n    const structuredData = {\r\n      \"@type\": \"AggregateRating\",\r\n      \"ratingValue\": ratingValue,\r\n      \"reviewCount\": reviewCount\r\n    };\r\n\r\n    let productSchemaFound = false;\r\n    const scripts = document.querySelectorAll(\"script&#91;type='application\/ld+json']\");\r\n\r\n    scripts.forEach(script => {\r\n      try {\r\n        const data = JSON.parse(script.textContent);\r\n\r\n        if (Array.isArray(data&#91;\"@graph\"])) {\r\n          data&#91;\"@graph\"].forEach(item => {\r\n            if (item&#91;\"@type\"] === \"Product\" || item&#91;\"@type\"] === \"ProductGroup\") {\r\n              item.aggregateRating = structuredData; \/\/ Overwrite unconditionally\r\n              productSchemaFound = true;\r\n            }\r\n          });\r\n          if (productSchemaFound) {\r\n            script.textContent = JSON.stringify(data);\r\n          }\r\n        } else if (data&#91;\"@type\"] === \"Product\" || data&#91;\"@type\"] === \"ProductGroup\") {\r\n          data.aggregateRating = structuredData; \/\/ Overwrite unconditionally\r\n          script.textContent = JSON.stringify(data);\r\n          productSchemaFound = true;\r\n        }\r\n      } catch (e) {\r\n        \/\/ Ignore parsing errors\r\n      }\r\n    });\r\n\r\n    \/\/ If no schema was found and updated, inject a new one\r\n    if (!productSchemaFound) {\r\n      const newData = {\r\n        \"@context\": \"https:\/\/schema.org\/\",\r\n        \"@type\": \"Product\",\r\n        \"name\": \"{{ product.title | escape }}\",\r\n        \"image\": &#91;\"{{ product.featured_image | img_url: 'master' | prepend: 'https:' }}\"],\r\n        \"description\": {{ product.description | strip_html | json }},\r\n        \"sku\": \"{{ product.selected_or_first_available_variant.sku }}\",\r\n        \"brand\": {\r\n          \"@type\": \"Brand\",\r\n          \"name\": \"{{ product.vendor | escape }}\"\r\n        },\r\n        \"aggregateRating\": structuredData\r\n      };\r\n\r\n      const newScript = document.createElement(\"script\");\r\n      newScript.type = \"application\/ld+json\";\r\n      newScript.textContent = JSON.stringify(newData);\r\n      document.body.appendChild(newScript);\r\n    }\r\n  });\r\n&lt;\/script>\r\n{% endif %}<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2>\u05dc\u05de\u05d9 \u05e9\u05e6\u05e8\u05d9\u05da \u05e2\u05d6\u05e8\u05d4<\/h2>\n\n\n\n<p>\u05d0\u05dd \u05d0\u05d9\u05e0\u05db\u05dd \u05d1\u05d8\u05d5\u05d7\u05d9\u05dd \u05d0\u05d9\u05e4\u05d4 \u05d1\u05d3\u05d9\u05d5\u05e7 \u05dc\u05d4\u05d3\u05d1\u05d9\u05e7 \u05d0\u05ea \u05d4\u05e7\u05d5\u05d3 \u2013 \u05de\u05d5\u05de\u05dc\u05e5 \u05dc\u05d4\u05d9\u05e2\u05d6\u05e8 \u05d1\u05de\u05e4\u05ea\u05d7 \u05d0\u05d5 \u05d0\u05d9\u05e9 \u05d8\u05db\u05e0\u05d9.<\/p>\n\n\n\n<p>\u05d1\u05d4\u05e6\u05dc\u05d7\u05d4\u2728!<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"\u05d0\u05d9\u05da \u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05e7\u05d5\u05d3 \u05e7\u05d8\u05df (Liquid) \u05e9\u05d9\u05d0\u05e4\u05e9\u05e8 \u05dc\u05d2\u05d5\u05d2\u05dc \u05dc\u05e1\u05e8\u05d5\u05e7 \u05d0\u05ea \u05d4\u05d1\u05d9\u05e7\u05d5\u05e8\u05d5\u05ea \u05d0\u05e6\u05dc\u05db\u05dd \u05d1\u05d0\u05ea\u05e8 \u05d5\u05dc\u05d4\u05d5\u05e1\u05d9\u05e3 \u05dc\u05db\u05dd \u2b50\ufe0f\u2b50\ufe0f\u2b50\ufe0f\u2b50\ufe0f\u2606 (23) \u05d1\u05ea\u05d5\u05e6\u05d0\u05d5\u05ea \u05d7\u05d9\u05e4\u05d5\u05e9 &#8211; \u05d6\u05d4 \u05d9\u05db\u05d5\u05dc \u05dc\u05e2\u05d6\u05d5\u05e8 \u05dc\u05e9\u05e4\u05e8 \u05d0\u05ea \u05d9\u05d7\u05e1 \u05d4\u05d4\u05e7\u05dc\u05e7\u05d4 \u05d0\u05dc\u05d9\u05db\u05dd \u05d5\u05dc\u05e9\u05e4\u05e8 \u05d0\u05ea \u05de\u05d9\u05e7\u05d5\u05de\u05db\u05dd \u05ea\u05d5\u05e6\u05d0\u05d5\u05ea \u05d4\u05d7\u05d9\u05e4\u05d5\u05e9. \u05d0\u05d9\u05e4\u05d4 \u05de\u05de\u05e7\u05de\u05d9\u05dd? \u05d9\u05e9 \u05dc\u05d4\u05d9\u05db\u05e0\u05e1 \u05dc\u05e2\u05d5\u05e8\u05da \u05d4\u05ea\u05d1\u05e0\u05d9\u05d5\u05ea \u05d1 Shopify \u05e9\u05dc\u05db\u05dd \u05d5\u05dc\u05e2\u05e8\u05d5\u05da \u05d0\u05ea \u05d4\u05e2\u05de\u05d5\u05d3 theme.liquid [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[320,316],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/flashy.app\/he\/wp-json\/wp\/v2\/posts\/31482"}],"collection":[{"href":"https:\/\/flashy.app\/he\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/flashy.app\/he\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/flashy.app\/he\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/flashy.app\/he\/wp-json\/wp\/v2\/comments?post=31482"}],"version-history":[{"count":2,"href":"https:\/\/flashy.app\/he\/wp-json\/wp\/v2\/posts\/31482\/revisions"}],"predecessor-version":[{"id":31484,"href":"https:\/\/flashy.app\/he\/wp-json\/wp\/v2\/posts\/31482\/revisions\/31484"}],"wp:attachment":[{"href":"https:\/\/flashy.app\/he\/wp-json\/wp\/v2\/media?parent=31482"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/flashy.app\/he\/wp-json\/wp\/v2\/categories?post=31482"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/flashy.app\/he\/wp-json\/wp\/v2\/tags?post=31482"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}