• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Startup Hero

The Official Blog Of Name Hero

Learn To Fly Above The Competition Get Started
  • HomeWelcome
  • CoursesVideo Training Center
  • About UsWhat is StartupHero?
  • BlogGet the latest
  • Start HereStartup 101
  • SpeakingPodcast & Media
  • ResourcesTools to help You
    • Reselling WordPress Hosting
    • Resell Hero
    • How To Start A Blog
  • NameHeroCloud Web Hosting

Using JSON In WordPress – Best Practice

By Bhagwad Park on September 29, 2020 0

Using JSON In WordPress – Best Practice

With search engines trying harder to understand the context of your website, it’s essential that you become familiar with JSON and how to effectively use it in WordPress in a scalable manner. In the past, we needed to use 3rd party plugins or rely on the generosity of themes to allow us to add JSON code to WordPress posts and pages. But now with Gutenberg, it’s easy as pie!

First, a quick primer.

What is Schema and JSON?

In the context of the most common use case for JSON, it’s a way to describe the information on your site in a format that’s easily accessible to search engines. Say you write a blog post about a certain product. Everyone writes in a different way. Some will use price comparison tables. Others might just mention the price in an ordinary paragraph of text. Some might not even mention the price!

With so many different approaches, it helps if there’s a standardized way of representing text. And that’s where schema comes in. The Google documentation on structured data allows you to specify information about the entity you’re describing in a standardized format so that it can be easily picked up and processed by search engines.

Here are some examples of what you might use schema for:

  1. Product reviews
  2. Pricing comparisons
  3. Recipes
  4. Frequently Asked Questions and How Tos
  5. Event details

And a lot more. There are literally hundreds or thousands of structured data formats that you can use. One of the benefits to this, is that you can get enhanced search results in the SERPS. For example, I use structured data on my site WP-Tweaks.com to write about NameHero’s products. Here’s a screenshot of what my SERP looks like for when someone searches for a NameHero coupon or review:

Retings Schema for NameHero on WP-Tweaks.com
Retings Schema for NameHero on WP-Tweaks.com

The stars that you see below the search result are automatically generated by Google as it parses my site for structured data. I’ve set up a form submission facility on the site where users can write their own reviews. These are then collated into a specific format that is consumed by search engines and displayed in the SERPS.

And that’s where JSON comes in. JSON is the language we use to talk about structured data.

Inserting JSON Code into WordPress

This isn’t the place to go into details on how to write JSON. Ideally, you would take a sample JSON code and just modify it to suit your needs instead of building a new one from scratch. You can then test your code using Google’s structured data testing tool to identify any syntax errors.

Once your code is ready, you need to insert it into your WordPress post. Luckily with Gutenberg, you just need to create a block called “Custom Code” and then paste your JSON into it anywhere on the page (usually on the bottom). Previously, we need to use themes or plugins to insert additional code like this, but with Gutenberg, placing code snippets is easy as pie. You don’t need any tricks or workarounds.

Once done, simply save your post and invite Google to craw it via the Google Search Console. If everything goes according to plan, you should be able to see your new Google structured data show up in the search results in as little as a few hours!

Bottom Line

Using JSON in WordPress can elevate your articles a few notches by providing valuable contextual information that is specially displayed in search engine results. And using WordPress’s Gutenberg, you can do it easily in just a few seconds.

Bhagwad Park Profile Picture
Bhagwad Park

I’m a NameHero team member, and an expert on WordPress and web hosting. I’ve been in this industry since 2008. I’ve also developed apps on Android and have written extensive tutorials on managing Linux servers. You can contact me on my website WP-Tweaks.com!

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Connect With Us!

Superhero Resources

Fix Common Issues

  • How To Setup Free And Automatic SSL Certificates
  • How To Setup Cloudflare With Railgun
  • How To Fix Memory Exhausted Errors In WordPress
  • How To Edit PHP Version/Upload Limit/Add Extensions
  • How To Move/Migrate Your Business To Name Hero

Free Guides

  • How To Setup NameHero Hosting
  • How To Create A Web Hosting Business With WordPress
  • How To Start A WordPress Blog
  • How To Migrate WordPress To A VPS
  • How To Speed Test And Optimize Your WordPress Website
  • Magento 2.X Installation Guide
  • How To Clean Up A WordPress Hack

Training

Recent Posts

  • Disable JSON REST Entirely on WordPress!
  • Using Cloudflare’s “URL Normalization” Rules
  • Will Google FLOC Affect Website Owners?
  • Good Riddance To Contact Forms – Hello Google Forms!
  • How To Identify CLS Issues Using Google Chrome
  • How To Achieve ~90% Cache Hit Ratio On Cloudflare
Subscribe in a reader
  • Web Hosting
  • WordPress Hosting
  • Reseller Hosting
  • VPS Hosting
  • Twitter
  • Facebook
  • LinkedIn
  • YouTube
  • FTC Disclosure
  • Earnings Disclosure
  • Privacy Policy

Copyright © 2021 · Smart Passive Income Pro on Genesis Framework · WordPress · Log in