fauzanjeg

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

Dec 2nd, 2021
943
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* Custom Meta on AMP Mode || Remove Meta Author 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.     return $meta;
  7. }
  8. add_filter( 'amp_post_article_header_meta', 'custom_meta_in_amp_mode' );
RAW Paste Data