Adding corporate contacts in Schema markup

Need help with this?
Purchase All in One SEO Pack Pro to get dedicated support from us.

Buy Now

In the Schema Settings section of All in One SEO Pack, you can add corporate contact information for your organization.  The fields for this are displayed when you select Organization under Person or Organization.  There are fields for Phone Number and Type of Contact.  See our Schema Settings documentation.

In addition, we have a filter hook in our API for users who want to add more contacts.  Note that contactType and telephone are required, whereas areaServed, availableLanguage and contactOption are optional.

Example code for this filter is shown below:

function aioseop_add_schema_contacts( $data ) {
	// Initalized contactPoint as an array.
	$contact_points = array();

	if ( isset( $data['contactPoint'] ) ) {
		// Adds AIOSEOP's setting if setting is used.
		$contact_points[] = $data['contactPoint'];
	}
	$data['contactPoint'] = array();

	// Contact 1.
	$contact_points[] = array(
		'@type'         => 'ContactPoint',
		'telephone'     => '+1-555-123-4567',
		'contactType'   => 'customer service',
		'contactOption' => 'TollFree',
		'areaServed'    => 'US',
	);

	// Contact 2.
	$contact_points[] = array(
		'@type'         => 'ContactPoint',
		'telephone'     => '+1-555-234-5678',
		'contactType'   => 'technical support',
		'contactOption' => array(
			'TollFree',
			'HearingImpairedSupported'
		),
		'areaServed'    => array(
			'US',
			'CA',
		),
	);

	// Contact 3.
	$contact_points[] = array(
		'@type'         => 'ContactPoint',
		'telephone'     => '+1-555-234-5678',
		'contactType'   => 'bill payment',
		'contactOption' => 'TollFree',
		'areaServed'    => array(
			'US',
			'CA',
		),
		'availableLanguage' => array(
			'English',
			'French',
		),
	);

	// Adds the contactPoint variable to the schema data.
	$data['contactPoint'] = $contact_points;

	return $data;
}
add_filter( 'aioseop_schema_class_data_AIOSEOP_Graph_Organization', 'aioseop_add_schema_contacts' );

For instructions on how to use this code, please refer to our FAQ here.

  • Was this helpful ?
  • YesNo
[i]
[i]
Skip to toolbar