• armaghan26

    (@armaghan26)


    Does this plugin also removes Yoast FAQ and How to Schema from the post? What if I want to only disable Yoast Schema and use the FAQ and How to Schema of Yoast?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tim van Iersel

    (@timvaniersel)

    Hi, excellent question.

    Currently we don’t support this yet (haven’t tested it) but it’s something that I also would like to have so I’m going to write something to support this.

    Thread Starter armaghan26

    (@armaghan26)

    Thanks. looking for update soon

    Plugin Author Tim van Iersel

    (@timvaniersel)

    Still looking for a better way to remove all schema except FAQ and HowTo’s.

    A hack that you could try out for FAQ’s would be something like this:

    add_filter( 'wpseo_schema_organization', '__return_false' );
    add_filter( 'wpseo_schema_person', '__return_false' );
    add_filter( 'wpseo_schema_website', '__return_false' );
    add_filter( 'wpseo_schema_mainimage', '__return_false' );
    add_filter( 'wpseo_schema_webpage', '__return_false' );
    add_filter( 'wpseo_schema_author', '__return_false' );
    add_filter( 'wpseo_schema_breadcrumb', '__return_false' );
    add_filter( 'wpseo_schema_article', '__return_false' );
    add_filter( 'wpseo_schema_faq', 'pluginnl_reformat_wpseo_faq' );
    
    function pluginnl_reformat_wpseo_faq( $data ) { 
      $data[0]['@type'] = 'FAQPage'; 
      $data[0]['mainEntity'] = $data[0]['itemListElement']; 
      unset($data[0]['mainEntityOfPage']);
      unset($data[0]['itemListElement']);
      unset($data[0]['numberOfItems']);
      return $data; 
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Yoast FAQ and How to’ is closed to new replies.