Author Box with Latest Article

Posted in: Newspaper
Post count: 7

Hi,

I want to use author box in a carousel, showing avatart, name and title from the latest article from this author.

I ve searched the forum, cant find anything like that. I managed to find the same function for authors box —

$buffy .= ‘<div class=”td-authors-url”>’;
$last_article = $wpdb->get_row($wpdb->prepare(“SELECT * FROM $wpdb->posts WHERE post_author = %d AND post_status = ‘publish’ AND post_type = ‘post’ ORDER BY post_date DESC LIMIT 1”, $td_author->ID), ARRAY_A);
$buffy .= ‘‘ . $last_article[‘post_title’] .’‘;
$buffy .= ‘</div>

—- ,

but copying this to author box, in any place either doesnt work, or breaks the web site.
Any advice?

Thank you

Post count: 22421

Hello,

Sorry but the author box element was not tested in a carousel. This is a custom implementation and will require coding skills to make. Unfortunately we cannot offer a solution in this regard. You can hire a freelancer to help with the code from sites like studio.envato.com

Thank you for understanding.

Post count: 7

Hi,

I understand the part of the carousel. But how can i show the latest article title? Without using carousel or anything else. I can just put three author boxes in three different columns, using author id and still do the job i need

Thanks

Post count: 22421

Hello,

I’m not sure what you plan to do. The theme has no functionality to show the latest articles for each of the authors of an author box. You can add a block filtered by the author though underneath each author to have a block shown the author’s latest posts.

Thanks

Post count: 7

Hi,

we have in the website a part called “opinions” . So i want in different parts of the page to just show different authors withe just their avatar, and title of latest post.
So with the author box, i have avatar, name but i need the latest title article, that is why i tried to use the code above

Post count: 20688

Hi,

There is an author widget that will display any author you want, but it will not display the author’s latest posts. Only in the author page there will be a section that displays the author posts. Example of an author page
https://demo.tagdiv.com/newspaper/author/admin/
The author box will not show the latest posts of an author, it is not supposed to do that. If this is required for you, maybe you can find a plugin that can display such an element and make tests with it. Sorry for any inconvenience.

Thanks

Viewing 6 posts - 1 through 6 (of 6 total)
The forum ‘Newspaper’ is closed to new topics and replies.