Advertisement
jaideep06

AreaServed

Jan 22nd, 2023
955
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.34 KB | None | 0 0
  1. add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
  2.     if ( isset( $data['publisher'] ) ) {
  3.         $data['publisher']['areaServed']['@type'] = "city";
  4.         $data['publisher']['areaServed']['name'] = "Madrid";
  5.         $data['publisher']['areaServed']['sameAs'] = "https://en.wikipedia.org/wiki/Madrid";
  6.     }
  7.     return $data;
  8. }, 99, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement