Tassos Marinos Developer of Joomla Extensions

How to add Structured Data to K2

Updated 02 Jul, 2020
Component K2
Supported Views Item
Supported Content Types Article
Availability Pro Only Since v1.0.0 Pro

Google Structured Data integrates perfectly with K2 for all the item based snippets available. This means that you can select any K2 Item and generate any of the available Content Type schemas for it. Let's see how you can take advantage of this integration.

Enable Integration

As with all of the integrations, you need to navigate to Components > Google Structured Data > Configuration and click the Integrations Tab where all the Integrations are listed.

gsd3-integrations

Find the "K2" Integration in the list and make sure that it is enabled with the green checkmark indicator as shown in the screenshot below.

K2 Structured Data

Integration Settings

To view the available settings, go to Google Structured Data -> Configuration and click on the gear button next to the integration's name.

K2 Addon Settings

In the K2 integration settings screen, you will find the following 3 options:

Enable Fast Edit

If enabled, a tab called Plugins will be activated in the K2 Item's editing page in order to be able to directly add and edit structured data items.

K2 Fast Edit

Use Custom Fields

Enable this option if you'd like to map schema properties with the custom fields assigned to K2 Items

Article Custom Fields

Image Size

Select the K2 Item image version you'd like to use in your structured data.

Add Article Structured Data to K2 Items

Let's see how you can add the Article Content Type to K2 Items. From the Components menu, choose Google Structured Data, nagivate to the Items section and click on the New button to create a new Structured Data Item.

GSD New Item

On the next page, you will see the following 3 options where you will need to select the Article Content Type and the K2 Integration respectively as shown in the screenshot below.

GSD K2 New Item

Click Save to return to the same page. Once the item is saved 2 new sections appearing.

  • Article: This section helps you map the content type properties with Page options, Meta Properties, Site info and more.
  • Publishing Rules: This is where you can select the pages where the structured data is going to be generated to.

To learn more details on how you can use these sections visit the How to Add Structured Data to Pages documentation page.

Publishing Rules

In case, you don't want to generate the Article Content Type to all pages, you can use the available publishing rules to target specific pages. The K2 Integration implements the following publishing rules:

NameDescription
Item Target specific K2 Items only.
Category Target all Items assigned to specific K2 Categories.
Tag Target all Items assigned to specific K2 Tags.

To learn more about the Publishing Rules section visit the How to add Structured Data to Pages documentation page.

Remember, in case you don't enable any publishing rules, the structured data will be generated on all K2 articles.

Notes

K2 2.10 introduced a new configuration option under the SEO tab, called Google Structured Data. That option is enabled by default and generates the Article schema on all K2 Items in JSON-LD format. If you're already using the Google Structured Data extension in conjuction with the Article schema type, it is recommended to disable the K2 Google Structured Data option to prevent duplicate content.