fauzanjeg

Custom Meta on AMP Mode || Remove Meta Author and Time on AMP Mode

May 3rd, 2026
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.40 KB | None | 0 0
  1. /* Custom Meta on AMP Mode || Remove Meta Author and Time on AMP Mode */
  2. function custom_meta_in_amp_mode( $meta ) {
  3.     if ( ( $key = array_search( 'meta-author', $meta ) ) !== false ) {
  4.         unset( $meta[ $key ] );
  5.     }
  6.     if ( ( $key = array_search( 'meta-time', $meta ) ) !== false ) {
  7.         unset( $meta[ $key ] );
  8.     }
  9.     return $meta;
  10. }
  11. add_filter( 'amp_post_article_header_meta', 'custom_meta_in_amp_mode' );
Advertisement
Add Comment
Please, Sign In to add comment