Advertisement
jaideep06

Example

Sep 20th, 2024
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.33 KB | None | 0 0
  1. <?php
  2. add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
  3.     $exclusions = [1, 11]; // Add the IDs of the current location pages you have already created (in this example, it would work on IDs 1 and 11)
  4.     if ( in_array( get_queried_object_id(), $exclusions ) ) {
  5.         unset($data['publisher']);
  6.     }
  7.     return $data;
  8. }, 99, 2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement