Wordpress

Description

Script that automates schema.org markup implementation as microdata for wordpress websites.

By using PHP, and custom wordpress functions, the script reads the content of the page, and re-builds the html of each wordpress page.

The microdata will automatically be added on both the existent, and the new pages, and posts.

Implementation

  1. Create a Child Theme, and add the entire script in its functions.php file
  2. Upload the file via FTP
    • Path: http://website.com/wp-content/themes/[Your-Theme]/inc/implement-schema.php
    • Register: Add one of these lines to your theme’s functions.php file (follow the code structure):
      • require_once( ‘inc/implement-schema.php’ );
      • require_once get_template_directory() . ‘/inc/implement-schema.php’;
  3. Install a Custom Code Plugin, and create a php snippet to add the script

You can check the script online on Github!

Note: This script is not recommended for websites created with content builders (i.e. Elementor)!