Tips on how to add json ld in wordpress

For a time, we had Microformats. Those times were simple, along with good. Implementing Microformats will lead to interesting things, such as review ratings in Google’s search results. You could have your activities listed, recipes indexed, and all sorts of contact details marked up as essential data points for a crawler to parse.

I really appreciated compound Microformats. They were easy to understand sets of attributes; included with the HTML containers adjacent useful data, like class="postal-code". Initially, web developers weren’t enthusiastic to add additional attributes with their markup, but over time, we’d get small wins, just like having class="hreview-aggregate" become built-in with the stylesheet, tackling appearance and information in one go.

Then Came RDFa
I never really attached with RDFa. It was tricky, it was XML, and all we used it for was an exceptionally over engineered solution to obtain rich snippets in Google’s search results. RDFa, an XML based extension to HTML5 was a much more powerful, although complexly structured solution when compared to Microformats.

For most digital marketing experts, RDFa was too intricate a thing to just work with. Top end web developers were mainly reluctant to implement RDFa, although at the time, those that were created to just got on along with it. The crippling blow for you to RDFa from the marketing area was that support coming from search engines was inconsistent and then the extra complexity was hard justify.

JSON-LD is everywhere it’s at, friends. Here’s why I think this:

You could create a JSON payload easily and deploy anywhere on the website, including the head
Developers know it immediately (and love it, immediately)
JSON-LD plays fine with other markup formats, should you have to use them
JSON-LD can be implemented outside the presentation level - it doesn’t mess up any of your HTML
It’s very easy to implement via PHP in WordPress
I’ve possessed a few objections to this, particularly; it feels “weird” to redundant data on the webpage and support is limited (breadcrumbs won’t work).

I’ve reflected on individuals points for hours and I think the benefits in faster release outdo any concerns. Sure - duplication. Specifically, the ArticleBody value for in-depth content, for example. I still don’t think that’s a problem.

Putting into action JSON-LD in WordPress
So , on that note let’s get to the of the post. I had tons of fun implementing JSON-LD across our homepage, author pages along with posts.

I’d like to reveal the code, with complete and huge thanks to Pete for the help, patience and schooling in PHP enough which i can do this outside the loop along with handle JSON in PHP like a boss.

Take json ld structured data plugin within the head of my creator page.