legacy-knowledge-base
公開されました Jun. 30, 2025

How to add application/ld+json in specific page

投稿者

Santhosh Kumar

knowledge-article-header-disclaimer-how-to

knowledge-article-header-disclaimer

legacy-article

learn-legacy-article-disclaimer-text

Issue

  • The user wants to add an application/Id+json script on a specific page.

Environment

  • Liferay DXP 7.3
  • Liferay DXP 7.4

Resolution

  • Create a fragment from Design -> Fragments
  • Paste the below script, just for reference:
<script type="application/ld+json">
    {
      "@context": "https://schema.org/",
      "@type": "Recipe",
      "name": "Party Coffee Cake",
      "author": {
        "@type": "Person",
        "name": "Mary Stone"
      },
      "datePublished": "2018-03-10",
      "description": "This coffee cake is awesome and perfect for parties.",
      "prepTime": "PT20M"
    }
</script>

 

  • Add the created fragment to the specific page and check the inspect tab in the browser console.

 

Additional Information

did-this-article-resolve-your-issue

legacy-knowledge-base