Lets first understand what is the Structured Data. Introduction of Structured Data.
Google says, “Structured data is a standardized format for providing information about a page and classifying the page content;”
Structured data is a markup code that contains defined schema terms and its values. These data helps search engines to understand the content of page and also the meaning of the page.
Search Engines also use the structured data to enable special search result features and enhancements. Google uses this structured data to display enhanced.
Google Search supports the following formats to read structured data.
- JSON-LD [Recommended by Google]
First create the structured data for one of your content. I am not going to describe here the detailed steps to generate structured data.
You can use Google’s “Structured Data Testing Tool” or “Structured Data Markup Helper”.
I have created “BreadcrumbList” structured data for one of my article https://everyething.com/How-to-Enable-TLS-protocols-in-Soap-UI
There are different types of structured data available and it depends which business you are doing and what type data would best for you.
Whether you are writing cooking recipe, your post is regarding a review of a book or gadget etc. Then you can select your intended structured data format.
It shows the page position in the site hierarchy. A user can navigate different position in the site hierarchy. For details, you can see https://developers.google.com/search/docs/data-types/breadcrumbs
Now I have my structured data in JSON-LD format for one of my article. Now we need to add this data to the content.
Okay let’s move into Drupal 7 and add a new field in the content type to hold the structured data step by step.
Go to “Configuration” => “Text formats” in Content Authoring.
Add a new text format with name “Unaltered”, Select role “administrator”
Go to “Structure” => “Content Types”, Click on the “manage fields” of the selected content type for which you want to add the structured data. I have done this for my “Article” content type.
“Add new field” named “Structured Data” and “FIELD TYPE” as “Long Text” and WIDGET “Text area (multiple rows)” as shown below.
Once the field is added, click on the “Edit”.
And make sure that “Text processing” is selected as “Filtered text (user selects text format)”
Now go to “Find Content” and find your article content where you want to add the structured data. For my case it I have opened my https://everyething.com/How-to-Enable-TLS-protocols-in-Soap-UI in edit mode.
Select text format as “Unaltered” and paste your structured data in the “Structured Data” field.
Then save the content and wait for next time Google to crawl your content. Then your content will show the BreadcrubList in Google search result as mine.
In a nutshell, create a text format which supports everything provided even the script, and add a new field in your content type to provide the structured data and select appropriate text format for it.