WordPress.org

Forums

Microdata Manager
Changing the default schema type from WebPage to Article? (3 posts)

  1. Tamal Anwar
    Member
    Posted 1 year ago #

    Hi, how do I change the default schema in Genesis from http://schema.org/WebPage

    to

    http://schema.org/Article

    Thanks

    https://wordpress.org/plugins/microdata-manager/

  2. bradpotter
    Member
    Plugin Author

    Posted 1 year ago #

    Sorry I missed your question.

    That is beyond the scope of my plugging however you can make a site-wide change with something like this in your Genesis child theme function file:

    add_filter( 'genesis_attr_body', 'my_attributes_body' );
    function my_attributes_body( $attributes ) {

    $attributes['itemtype'] = 'http://schema.org/Article';

    return $attributes;

    }

  3. Marj Wyatt
    Member
    Posted 10 months ago #

    @bradpotter ...

    I added this code to a custom post type archive (is_page_template):

    add_filter( 'genesis_attr_body', 'vm_list_schema' ); // Customize Schema Markup
    function vm_list_schema() {
      $attributes['itemtype'] = 'http://schema.org/ItemList';
      return $attributes;
    }

    It didn't work and threw out the styles I had written. So, I hard-coded the proper schema into my custom loop for that archive.

    But I remain curious. Would you have any answer as to why this didn't work?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Microdata Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic