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

WP SITES

2665

Original Genesis Tutorials & 5000+ Guaranteed Code

Snippets

  • Support
  • Newsletter
  • Videos
  • Log in

Premium Member? - Request custom code

Adding Business Contact Details With Schema To Your Theme

There’s many plugins like Yoasts Local SEO which enable you to add your organizations business details to your website.

This enables search engines to include this information in the search results like this example:

business-details

If you prefer to use code rather than install another plugin, this tutorial provides the code which includes the same schema as Yoasts plugin.

The code uses custom fields which makes its easy to input your business details to each field which is then wrapped in schema and output into your HTML source code for the search engine bots to scan.

You can also control where your business details are displayed in your theme by using different hook positions and conditional tags.

The output on the front end and in the source code is exactly the same as what Yoasts Local SEO plugin produces however its far easier to modify & style.

Here’s the code for logged in members:

Register for full access

Related Code Snippets

  • Add Opening Hours Schema To WordPress
  • Code Snippets To Modify Schema in Genesis

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

PHP Code

template_include

get_body_class

if else

array

class_exists

foreach

sprintf

add_action

printf

variable

Advertise · WPEngine · Genesis · Log in

  • How Premium Membership Works
  • Sign Up
  • Support
  • Subscription Details/Invoice
  • Tagged Tutorials
  • Access-Download Problems