Hello everybody,
i could made co authors works in post http://www.questeistituzioni.it/cosa-e-la-fatturazione-elettronica-pubblica-amministrazione-2038
but not in home ๐
i put the code by @partnowjess in module 9 (the “last post” in home) but it does not show the two authors ๐
i put this code in functions.php
function hybrid_entry_author_shortcode( $attr ) {
$attr = shortcode_atts( array( 'before' => '', 'after' => '' ), $attr );
if ( function_exists( 'coauthors_posts_links' ) ) {
$author = coauthors_posts_links( null, null, null, null, false );
} else {
$author = '<span class="author vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '" title="' . esc_attr( get_the_author_meta( 'display_name' ) ) . '">' . get_the_author_meta( 'display_name' ) . '</a></span>';
}
return $attr['before'] . $author . $attr['after'];
}
Thank You all!
Just a last thing: which code i have to put in the theme function.php? I put the code by @radu in my module 9 but still see just one author ๐
<div class="meta-info">
<?
//$buffy .= $this->get_author();
$coauths = get_coauthors();
if (count($coauths) > 1) {
echo "by ";
foreach($coauths as $key => $coauth) {
echo '<a href="/author/'.$coauth->user_nicename.'">'.$coauth->display_name.'</a>';
// add "and"
if ($key != count($coauths)) {
echo ' and ';
}
}
} else {
echo $this->get_author();
}
?>
<?php echo $this->get_date();?>
<?php echo $this->get_commentsAndViews();?>
</div>
@partnowjess hello! I saw now your theme works fine with the two authors in loop too. May you explain how do you made this please? my co author plus works just on single pages ๐
Hello guys!
Could be great if there were the possibility to give a href to the background image. Could be great for a newspaper to sell a “background page image AD”. Think about it!
the site is http://www.questeistituzioni.it
Yes! I turned off the “Author Avatars List” plugin i used in “contact” pages and gravatars now work. Searching for a new plugin that shows a author list,
thank you!
Lucio
Yes, but i turned off the WP User Avatar plugin, the gravatar option in discussion option page is ON, but now i can’t see the gravatars of the authors that have one configured, like in this page http://www.questeistituzioni.it/author/federico-stoppa
seems like the theme function doesn’t work after installing and turning off the WP User avatar plugin ๐
Thank you! it works great, but i have another question:
what do i have to put there in order to shot the principal category too?
I tried with
$buffy .= $this->get_category();
but it doesn’t work…
thank you!
Lucio