[Support request] JSON-LD Implementation

Home Forums Support [Support request] JSON-LD Implementation

Home Forums Support JSON-LD Implementation

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #452736
    Mike

    An old post of your’s (Tom’s) mention putting the script in the footer. Then I also see where it is suggested to put the script into wp_head by using a hook. Id i that and then ran the Google Structured Data Testing tool (https://search.google.com/structured-data/testing-tool) and while I received no errors, the ony “elements” I see are the ones coming from Generate Press itslef. Here is the code I used in the wp_head using a hook

     <script type="application/ld+json">
    {
    	"@context": "http://schema.org",
    	"@type": "LegalService",
    	"name": "Toledo Court Reporter - Lori Wozniak",
    	"address": {
    		"@type": "PostalAddress",
    		"streetAddress": "3329 Gallatin Rd",
    		"addressLocality": "Ottawa Hills",
    		"addressRegion": "OH",
    		"postalCode": "43615"
    	},
    	"image": "https://toledocourtreporter.com/wp-content/uploads/2017/12/court-gavel.png",
    	"email": "lori.wozniak@toledocourtreporter.com",
    	"telePhone": "419-472-2528",
    	"url": "https://toledocourtreporter.com",
    	"paymentAccepted": [ "cash", "check", "credit card", "invoice", "paypal" ],
    	"openingHours": "Mo,Tu,We,Th,Fr 08:00-17:00",
    	"geo": {
    		"@type": "GeoCoordinates",
    		"latitude": "41.669331",
    		"longitude": ""
    	},
    	"priceRange":"$$"
    
    }
    </script>
    

    Any ide where I am going wrong? First time trying this, a bit in deep water for me, but willing to learn.

    GeneratePress 2.0.1
    #452816
    Leo
    Staff
    Customer Support

    Hi there,

    Usually that will go into wp_footer by default unless the code has instruction where to insert it?

    #453342
    Burt

    Just an FYI – You can put the JSON-LD file anywhere – header footer. Since it is in-line in your HTML should be no issue with the speed of the page load.

    In the testing tool, you can test a complete page or the code. I’d test the JSON-LD code first to make sure it is correct. Once that is working and you get what you want, then attached it via the header or footer hook and see if it shows up correctly

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.