There are few ways to demonstrate the recent comments from your website using WordPress theme in the site’s sidebar. Below you will find the easiest ways to do this simple but at the same tricky task.
Just a couple of years ago, the service Disqus could find the script output of the latest comments from your website using WordPress themes. After updating the code, this possibility for some reason has been removed. It is not clear why, but it was kind of difficult to find this code right now.
Digging on the old posts about WordPress templates and Disqus, we were able to find this code. Here it is, of course, you only need to insert your data into the right place:
Do not forget to replace the word your website instead of YOURSITE in the Disqus, and the text code num_items = 5 can be replaced with 5 most recent comments that you need to show in your sidebar in any WordPress template.
Next, insert the code in the desired Tab and check what we have. So, with Disqus understood right now, now you want to display the standard comments by WordPress template.
Download, install and activate this plugin to your WooCommerce theme. Then you can use one of its great settings:
These tabs before or after script Disqus comments to insert the following code:
<ul> <? php wp_recentcomments (); ?> </ ul>
Save and see that no comments are currently displayed. And the thing is that PHP Code widget cannot be read. Therefore, we need to make the php code to work in any widget of your WooCommerce themes.
Download the plugin Most Commented Widget from the official site. Then choose: Plugins> Add New. We click to download the file. Click Browse, find the downloaded Most Commented plugin and click Install Now.
After installation, activate the plugin. If you closed the window, the plugin can be activated differently. Select the plug-ins> set. Via the page of the plugin’s management, check all options. Then find the Most Commented widget and click to activate.
Now we need to bring the popular comment in the sidebar of your WooCommerce theme. Find the pull-down list and select Widgets.
In the left column you will see the available widgets that can be added to the sidebar of your blog. To do this, choose Most Commented and drag the mouse cursor in the right-hand column – to your sidebar in a WooCommerce template.
You open the settings of Most Commented widget. Enter the title that will be displayed in the sidebar. In the Display, you can choose what will be displayed posts and pages together or separately. In the Maximum number of results, the number of exhibiting commented articles that will be displayed. You can also put a limit output for the most commented posts. Later do not forget to save the changed settings.
Visit your website with one of WooCommerce themes and refresh the main page. In the right sidebar, you will see a new block with the most popular comments.
One standard license is valid only for 1 project. Running multiple projects on a single license is a copyright violation.