Mar 03, 2020 4:17 pm
Hi 😀
First of all I appreciate your supports.
I have a question.
I would like to show how many the first topic has "likes" on the threaded table (wpforo/wpf-themes/classic/layouts/4/topic-thread.php)
I would like to show the numbers besides the number of comments.
How can I retrieve the first topic's likes number?
I found the code "<?php wpforo_post_likers($post['postid']); ?>" but don't know how to get postid on the table.
Could you please give a tip?
Many many thanks.
Have a good day! 🙂
Sincerely,
Jen
Â
4 Replies
Mar 04, 2020 2:37 am
I don't know whether it is the best practice or not,
Adding this line to fuction-template.php
$thread['likes_count'] = WPF()->post->get_post_likes_count($thread['first_postid']);
After that, $thread['likes_count'] works well.
Thank you 🙂