Viewing 1 replies (of 1 total)
  • There are a few methods of removing the author. The website has a section on modifying the author information via a reader mode template override.

    Another option is to add the below to your active themes functions.php file:

    add_filter( 'amp_post_article_header_meta', 'xyz_amp_remove_author_meta' );
    function xyz_amp_remove_author_meta( $meta_parts ) {
    	foreach ( array_keys( $meta_parts, 'meta-author', true ) as $key ) {
    		unset( $meta_parts[ $key ] );
    	}
    	return $meta_parts;
    }

    You could also use a CSS approach, although if you’re using reader mode it would also need to be added to your functions.php file (reader mode does not use your active themes stylesheets).

    add_action( 'amp_post_template_css', function() {
            ?>
            [amp] .amp-wp-meta{display:none}
            <?php
    } );
Viewing 1 replies (of 1 total)
  • The topic ‘Removing a post author’ is closed to new replies.