Home User profile
tagDiv Member
This user did not write anything. So we are just showing here some random text to make the profile page look nice :)
ouchmyego
tagDiv Member

edit single.php under themes/Newspaper/mobile/
*note this fix cannot be done in a child-theme, if youre using a child theme, edit the single.php thats in the actual theme

this is what i did, see below

<div class="td-module-meta-info">
<?php
if ( function_exists( 'coauthors_posts_links' ) )
?>
<div class="td-post-author-name"><div class="td-author-by">By
<?php coauthors_posts_links(); ?>
</div></div>
<?php //echo $td_mod_single->get_author();?>
<?php echo $td_mod_single->get_date(false);?>
<?php echo $td_mod_single->get_comments();?>
<?php echo $td_mod_single->get_views();?>
</div>

ouchmyego
tagDiv Member

using vlad1984’s solution worked for me. all i to do was identify which templates used which blocks.

Here is the code for the blocks:

1. File: wp-content\themes\Newspaper\includes\wp-booster\td_module.php

Add this: https://pastebin.com/KsfC74zm below the author section

2. Locate the block that you want to use (ex: wp-content\themes\Newspaper\includes\modules\td_module_17.php

Replace this:
<?php echo $this->get_author();?>

With this:
<?php echo $this->get_coauthors();?>

ouchmyego
tagDiv Member

just a heads up, i was able to get the social icons on the author box by adding this code

echo '<div class="td-author-social">';
foreach (td_social_icons::$td_social_icons_array as $td_social_id => $td_social_name) {
//echo get_the_author_meta($td_social_id) . '<br>';
$authorMeta = get_the_author_meta($td_social_id, $coauth->ID);
if (!empty($authorMeta)) {
echo td_social_icons::get_icon($authorMeta, $td_social_id, true);
}
}
echo '</div>';

after
echo '<div class="td-author-description">' . $coauth->description . '</div>'; on your code

the entire code for that segment being:

<?php
if (td_util::get_option('tds_show_author_box') != 'hide') {
//echo $td_mod_single->get_author_box();
$coauths = get_coauthors();
if (count($coauths) > 1) {
echo '<div class="author-box-list">';
foreach ($coauths as $key => $coauth) {
echo '<div class="author-box-wrap">user_nicename . '">';
echo get_avatar( $coauth->user_email, '96' );
echo '
<div class="desc"><div class="td-author-name vcard author"><span class="fn">user_nicename . '">' . $coauth->display_name . '</span></div>';
echo '<div class="td-author-description">' . $coauth->description . '</div>';
echo '<div class="td-author-social">';
foreach (td_social_icons::$td_social_icons_array as $td_social_id => $td_social_name) {
//echo get_the_author_meta($td_social_id) . '<br>';
$authorMeta = get_the_author_meta($td_social_id, $coauth->ID);
if (!empty($authorMeta)) {
echo td_social_icons::get_icon($authorMeta, $td_social_id, true);
}
}
echo '</div>';
echo '</div><div class="clearfix"></div></div>';
}
echo '</div>';
} else {
echo $td_mod_single->get_author_box();
};
}?>

  • This reply was modified 8 years by ouchmyego.
  • This reply was modified 8 years by ouchmyego. Reason: formatting
ouchmyego
tagDiv Member

hello, I want to express my gratitude. I really appreciate you taking your time to post this solution.

I wondered if you were able to get it to show up on any of the blocks which would load story snippets dynamically.

When i was experimenting with implementing this plug-in i found the blocks author byline was controlled by \includes\wp_booster\td_module.php lines 119-135 but i was unable to correctly implement it. when i tried, it would inherent the page author instead of the author for each of the posts.

Any help would be greatly appreciated

Viewing 4 posts - 1 through 4 (of 4 total)