Derzeit the_author_posts_link()
ich als Projekt, wo ich ein Custom CSS zu the_author_posts_link()
hinzufügen the_author_posts_link()
.
Ich möchte die class “blog-link” mit the_author_posts_link()
. Wie füge ich eine CSS-class hinzu?
Sie können den Filter ” the_author_posts_link
, um die benutzerdefinierte blog-link
class hinzuzufügen:
/** * Add the 'blog-link' class to the output of the_author_posts_link() */ add_filter( 'the_author_posts_link', function( $link ) { return str_replace( 'rel="author"', 'rel="author" class="blog-link"', $link ); });