Created
June 14, 2018 14:09
-
-
Save rushijagani/c3f63c61d7cf86c9c45cdacdb5a1e85f to your computer and use it in GitHub Desktop.
Remove Author link from Post in Astra.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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