Skip to content

Instantly share code, notes, and snippets.

@rushijagani
Created June 14, 2018 14:09
Show Gist options
  • Save rushijagani/c3f63c61d7cf86c9c45cdacdb5a1e85f to your computer and use it in GitHub Desktop.
Save rushijagani/c3f63c61d7cf86c9c45cdacdb5a1e85f to your computer and use it in GitHub Desktop.
Remove Author link from Post in Astra.
<?php
/**
* Disable Author Archive link from Post Meta.
*/
add_filter( 'astra_post_author', 'your_author_meta_update' );
function your_author_meta_update( $output ){
$author_info = sprintf(
esc_html( '%s' ),
'<a class="url fn n" title="View all posts by ' . esc_attr( get_the_author() ) . '" rel="author" itemprop="url"> <span class="author-name" itemprop="name">' . esc_html( get_the_author() ) . '</span> </a>'
);
$output = '<span class="posted-by vcard author" itemtype="https://schema.org/Person" itemscope="itemscope" itemprop="author"> ' . $author_info . '</span>';
return $output;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment