Hi Tom and wonderful Generatepress team,
I use elements a lot to build custom headers for different pages / post. This works like a charme thank you so much. I do come across one issue
If using the {{post_author}}
field on a single post header, I get the author name linking to the author archive.
I don’t want a link to the author archive, I want simply the author name, no links. That is all.
For the blog index page I have added this to the function php
add_filter( 'generate_post_author_output','tu_no_author_link' );
function tu_no_author_link() {
printf( ' <span class="byline">%1$s</span>',
sprintf( '<span class="author vcard" itemtype="http://schema.org/Person" itemscope="itemscope" itemprop="author">%1$s <span class="fn n author-name" itemprop="name">%4$s</span></span>',
__( 'by','generatepress'),
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
esc_attr( sprintf( __( 'View all posts by %s', 'generatepress' ), get_the_author() ) ),
esc_html( get_the_author() )
)
);
}
This removes the link to the author archive for the blog index page. But I still get the link to the author archive on the single blog pages when using {{post_author}}
in the custom header.
How do I get rid of the of the link to the author archive, I would like to see only the author name without a link to the author archive.
Best
Martin
BTW Is there a place for feature requests/suggestions?