Styling the delimiters separately from coauthors() array?
-
I’m using the simple
coauthors();
template tag (creates an array, no links, standard delimiter setup of commas between authors, with ‘and’ before last author.) I’d like the authors to be bold, and the delimiters to retain the original lighter weight.Something like:
Written By: Author01, Author02 and Author3For now I’ve inserted span classes around
coauthors__echo
function to give me control over the styles of the delimiters’ font treatment.
i.e:... $default_between_last = ( defined( 'COAUTHORS_DEFAULT_BETWEEN_LAST' ) ) ? COAUTHORS_DEFAULT_BETWEEN_LAST : __( '<span class="array-delimiter"> and </span>', 'co-authors-plus' );
Is there a more elegant solution to achieve this? I notice other template tags with $args that wrap authors in anchors with classes applied, but I’ve been unable to alter the actual
coauthors();
function to inject html spans around the authors (which would obviously be a better solution for controlling a wrapper and styling the author instead of relying on these span inserts between them!)Does anyone have a similar implementation and care to share some guidance?
Thanks!
- The topic ‘Styling the delimiters separately from coauthors() array?’ is closed to new replies.