• Hi There,

    I’m trying to get rid of the author byline on my amp pages but can’t quite seem to do so.

    FYI: I have amp & pagefrog installed.

    I tried removing the author from meta by inserting the following in my functions.php of my child theme:

    '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;
    }

    as it was instructed from https://github.com/Automattic/amp-wp.

    Any ideas?

    Thanks!

    https://www.ads-software.com/plugins/amp/

Viewing 6 replies - 1 through 6 (of 6 total)
  • I’d likely just hack the /amp/ template file, make child template or however that works with latest version of plugin.

    Thread Starter bwuwu

    (@bwuwu)

    Thanks for the reply, but I’m not quite sure what you’re saying.

    Are you saying go into /plugins/amp/templates/ & modify one of the php files in there?

    REF:
    https://github.com/Automattic/amp-wp/blob/master/readme.md

    Customization / Templating

    The plugin ships with a default template that looks nice and clean and we tried to find a good balance between ease and extensibility when it comes to customization.

    You can tweak small pieces of the template or the entire thing depending on your needs.

    Thread Starter bwuwu

    (@bwuwu)

    Yes, I have followed those instructions on that page to tweak the template to remove author information, but it doesn’t quite work. Wondering if I implemented the code wrong or if there’s an alternative solution.

    So, you haven’t tried, oh, say … commenting the stuff in the author meta template … meta-author.php ?

    Thread Starter bwuwu

    (@bwuwu)

    Yup, tried that as well as renaming the file.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Remove Author byline’ is closed to new replies.