How to create an Event Schema for a Web Page

Join us in this tutorial video as we create an Event Schema using Actus Deep Schema and attach it to page.

You will learn how to use dynamic values and wikidata, define the basic information of the event, information about the location, the organizers and the performs, as well as pricing information and images for the event. Finally you will learn how to validate your schema markup on schema.org’s Structured Data Testing Tool or on Google’s Rich Result Testing Tool.

There are two possible methods for adding an item schema to your website.

  • The first method is applicable when you have event information on a page and want to attach the Event schema to that specific page.
  • The second method comes into play when your website employs an Event custom post type

We will focus on exploring the first method.

Event Schema; Get Started

To get started, navigate to the homepage and click on “Items Schemas“. From there, select the “Event schema” and click on the plus icon to create a new, empty Event Schema Form.Upon opening the form, you’ll notice a red warning at the top. Clicking on this warning will reveal suggestions and requirements for completing the form. The red properties are essential for the form to be considered valid. Clicking on a property will move your view to that specific field.

Dynamic Values

Now, let’s input a title. Notice that the title of the form updates to reflect your new value.Alternatively, instead of manually typing a value, you can simply right-click on the field and choose “Dynamic Value“. This option allows you to select a dynamic placeholder for the field. For example, by clicking on the “post” tab, you’ll gain access to a list of all available post variables. Select “Page title”. You’ll notice that the field’s value changes color, indicating that it’s now a dynamic value sourced from the page to which this schema will be attached. The value appears within brackets, which means that it serves as a placeholder, drawing from the Page’s Title.

Assign Event Schema to a Page

Notice that the warning about the title is no longer present. We’ll address the remaining requirements shortly, but before we proceed, let’s assign our new schema to a specific page. In the “Show on page” field, type the name of the desired page. Once you select a page, you’ll see the page title placeholder replaced by the actual title of the chosen page, and the form’s title will also reflect this change.

Event Information

Now, let’s move on to completing the rest of the fields in the “Info” section. Right-click on the Description field and select “Dynamic Value.” Then, choose the “Page excerpt.” You’ll notice the description field now takes its value from the page’s content. It will be displayed in color, indicating that it’s a dynamic value. This means that if you ever modify the excerpt of that page, this field will automatically reflect the new value. If you hover over the field, you’ll see the name of the placeholder.

Repeat the same process for the “URL” field.

Moving on below, you’ll find fields for the event’s “Status,” “Start Date and Time,” and details about the event’s “Rating.” We’ll keep the status as is and select a starting date and time. The “Timezone” field is already dynamically populated using the WordPress timezone value. If your event takes place in a different timezone, you can clear the dynamic value and select your desired timezone.

For now, we’ll leave the “End Date” field empty, as well as any information about the event’s rating.

Event Location & Persons

Looking at the warnings, you’ll notice there’s only one remaining red warning. Let’s address this by providing location information for the event. Depending on the type of event, whether it’s Physical, Online, or Mixed, different details are required. For a physical event, include information about the event’s location. For an online event, you must provide the URL of the event, and mixed events require both.

Let’s input a name and some address details for the location.

Moving on to the Organizers section, you’ll see a dropdown menu that contains any business or person schemas you’ve previously created. Alternatively, right-clicking on the field reveals three additional options. We’re already familiar with Dynamic Value. By selecting the Text Value option, the dropdown transforms into a text field, allowing you to manually input the name of the organizer.

Wikidata Values

Next, in the Performers section, you’ll find a similar dropdown, but this time, it contains only person schemas you’ve created. Right-click on this field and select “WikiData.” With this option, you can assign data from WikiData topics to your schema. Simply type the name and select the appropriate result. You can add more rows if needed, and each row can be either a dropdown, a Text Value, a Dynamic Value, or WikiData.

Now, the warnings only display orange properties. These properties are recommended for filling out to enhance the value of your event schema, but they are optional; your schema will remain valid even if they are left empty.

Event Pricing

Let’s include some pricing information. Add a row and select the “Availability.” We’ll obtain the price dynamically since there is a related meta already defined on the page. Set the date from which the tickets are available and provide any URL for online booking if it’s available.

Event Images

Finally, we arrive at the “Images” section. Here, you can provide images related to the event. You have the option to either retrieve them dynamically from the page’s content or click on “Edit” to manually add your own images. However, it’s worth noting that any images described in a schema must also be available on the page. Therefore, it’s recommended to leave this option as is for consistency and accuracy.

Validating Schema Markup

We now have a complete event schema that is attached to our page. You should notice there are no warnings or recommendations. Your schema is of high quality and is already being served on your page. Let’s proceed to test it.

To test the event schema, you can visit your page, right-click, and select “Inspect” (in Chrome). Then, click on Console, to view the schemas assigned to this page. You’ll be able to see the website and page schema, the business and audience schemas that are attached to the previous ones, and a breadcrumb schema. Most importantly, you’ll find the event schema we’ve just created.

Returning to Actus Deep Schema, click on the button in the top right corner of the form to get a preview of the new schema’s JSON. Click on Render Dynamic Values, to replace the placeholders with real values. Finally, click on “Validate” to send your schema to the Schema Markup Validator from schema.org. You can also test your schema using Google’s Rich Results Testing Tool by clicking on the “Rich Results Test” option.

Your event schema is now ready and valid!

If you’re interested in learning more about how to assign event schemas to your website when there’s an event custom post type, be sure to check out our related video.

Avatar
Google Embraces Car Schema: Advancing Vehicle Listing Structured Data Actus Deep Schema: The Best WordPress Plugin for Structured Data