Codeless
  • Support Home
  • Themes
  • Support
  • WordPress Tutorials
    • How to Start a Blog
    • Best Website Builders
    • Best Small Business Hosting
    • Email Marketing Services
    • Cheap WordPress Hosting
  • Video Tutorials

Community Forums

How to add json-ld to header (structured data)

#specular
    • 5 years, 1 month ago wesareed
      Participant

      How do I add JSON-ld script to the site header? Is there a way to do it in the functions.php file? Here is the script tag that needs to be added:

      <script type="application/ld+json">// <![CDATA[
      {
        "@context": "https://schema.org",
        "@type": "ProfessionalService",
        "name": "Patriot Pottys, LLC",
        "image": "https://patriotpottys.com/wp-content/uploads/2020/04/patriot-pottys-logo-footer.png",
        "@id": "",
        "url": "https://www.patriotpottys.com",
        "telephone": "844-476-8897",
        "address": {
          "@type": "PostalAddress",
          "streetAddress": "9115 Industry Drive",
          "addressLocality": "Manassas Park",
          "addressRegion": "VA",
          "postalCode": "20111",
          "addressCountry": "US"
        },
        "openingHoursSpecification": {
          "@type": "OpeningHoursSpecification",
          "dayOfWeek": [
            "Monday",
            "Tuesday",
            "Wednesday",
            "Thursday",
            "Friday"
          ],
          "opens": "08:00",
          "closes": "17:00"
        },
        "sameAs": [
          "https://www.facebook.com/PatriotPottys/",
          "https://www.linkedin.com/company/patriot-pottys/"
        ]
      }
      // ]]></script>
      
      • This topic was modified 5 years, 1 month ago by wesareed.
      • This topic was modified 5 years, 1 month ago by wesareed.
      • This topic was modified 5 years, 1 month ago by wesareed.
      • This topic was modified 5 years, 1 month ago by wesareed.
    • 5 years, 1 month ago Eldo
      Keymaster

      Hello,

      You can create a child theme and add it in the header.php of the child theme. Or you can use any of this plugins:

      Header and Footer Scripts

      Regards!

Viewing 1 reply thread

You must be logged in to reply to this topic.

Login

Log In
Register

Renew Support

  • Renew Specular Support
  • Renew Tower Support
  • Renew Folie Support
  • Renew Handel Support
  • Renew June Support
  • Renew Picante Support
  • Renew Thype Support
  • Renew Regn Support

Search Forums

Forums

  • Bygge – Construction Theme
  • Converta – Software Theme
  • Folie – The WordPress Website Builder
  • Handel – Responsive Multi-Purpose Business Theme
  • June WooCommerce WordPress Theme
  • Livecast – Podcast Theme
  • Picante – Restaurant & Food WordPress Theme
  • Regn | Agency & Business WordPress Theme
  • Remake – Minimal Portfolio & Agency Theme
  • Specular – Multi-Purpose WordPress Theme
  • Suggest us Features
  • Tower – Business-Driven Multipurpose WP Theme
  • Vibrance – Photography Theme

Site Links

  • Support Policy
  • Specular Support Forum
  • Video Tutorials
  • Knowledge Base
  • Guides and Reviews

Useful Articles

  • Build a Website
  • Web Design & Development
  • Hosting
  • WordPress

Login

Log In
Register Lost Password