felixarntz/schema-breadcrumbs-for-wordpress-seo

This package is abandoned and no longer maintained. No replacement package was suggested.

This class modifies the WordPress SEO plugin by Yoast to use valid Schema.org markup for breadcrumbs instead of the RDFa.

1.3.1 2015-03-12 09:29 UTC

This package is not auto-updated.

Last update: 2020-01-20 04:09:19 UTC


README

endorse

With this class the WordPress SEO breadcrumbs will use valid Schema.org markup.

This class will not have any function if the plugin WordPress SEO by Yoast is not activated on the current WordPress installation. Furthermore breadcrumbs have to be enabled in the plugin settings.

However, adding this class won't break anything since all the changes are made using filters from the WordPress SEO plugin. The filters used by the class are:

  • 'wpseo_breadcrumb_single_link'
  • 'wpseo_breadcrumb_output'

Usage of the class

As of version 1.2.0, the class uses a singleton pattern so that it can only be instantiated once. Simply include the class file in your theme or plugin. You can then enable it, for example, like this:

function yourtheme_instantiate_class()
{
  // only instantiate the class if Yoast breadcrumbs are used
  if( function_exists( 'yoast_breadcrumb' ) )
  {
    Schema_Breadcrumbs::instance();
  }
}
add_action( 'after_setup_theme', 'yourtheme_instantiate_class' );

You do not need to do anything more than instantiating the class, it will then work by itself.

Additional Information

Read this short article to find out something more about this class:

Check out the WordPress SEO plugin repository on GitHub:

Find out more about Schema.org markup:

This project is now on Packagist, require it with Composer: