[Solved] show Number of views below subscribe button
Please I need a code to show Number of views below the subscribe button. As shown in the picture below. It will look like
The number of views is not counted for forums. It's only counted for topics. Each topic has its number of views. I'm sorry but there is no total number of views in wpForo.
You can do this in update safe way by customizing wpForo post.php template file.
1. Create /wpforo/ folder in your WordPress active theme folder, if you have child theme in the child folder.
2. Copy /wp-content/plugins/wpforo/wpf-themes/classic/post.php file to just created /wpforo/ folder. Use some FTP client or your hosting service File Manager.
3. Edit the post.php, find this code line:
<div class="wpf-action-link"><?php WPF()->tpl->topic_subscribe_link() ?></div>
4. Add this code below that line:
<div class="wpf-topic-views"><?php echo __('Topic Views', 'wpforo') . ': ' . number_format($topic['views']); ?></div>
The documentation: https://wpforo.com/docs/root/forum-themes/theme-customization/
Thank you very much sir you and WPforo teams are always here to help us out anytime. The code worked thanks you very much sir, am so happy.