Note: I'm assuming that you'll be using a template override, in this instance, let's call it blog. The path to this template override would then be:
/your_home_directory/templates/your_template/html/com_k2/templates/blog/
Step 1
Create your Disqus account, setup your Facebook API key, your Akismet API key and any other options you prefer.
Step 2
Choose the 'Universal Code' option at the bottom of the install page:
Step 3
You'll see three steps to install your code. The code in Step 1 is the code that creates the comment form.
Typically, comment forms only appear on the full item, so you'll want to open item.php.
The absolute easiest place to insert the comment form code is straight after this code:
<!-- K2 Plugins: K2AfterDisplay -->
This will place it after author information, tags and any other plugins you have enabled.
If you're slightly more adventurous, you can inspect the code and determine where else you might like to place it. The K2 code is well commented and the css selectors named semantically, so it's not hard to place the code elsewhere if desired.
Step 4
Grab the Javascript code from Step 2 of the Disqus instructions and paste it into the index.php file of your template, right above the closing </body> tag.
Step 5
Step 3 of the Disqus instructions deals with placing the comment anchor. Depending on how you've setup your Disqus account, this can include the number of comments displayed and the number of social reactions. This should link to the full text of the K2 article at the start of the comment area.
Copy the code they give you:
<a href="http://example.com/my_article.html#disqus_thread">Comments</a>
Open the category_item.php file from your template overrides and paste it wherever you would like the comment anchor to appear.
Finally, change the HREF link so that the line of code now looks like this:
<a href="#disqus_thread">comments</a>
The word 'comments' will be replaced by your Disqus setup, such as '0 comments and 0 reactions'. When users click on this link, it will take them to the specific article the category item was displaying, anchored to the comment form.
If you're using a mod_k2_content template override, you can do use the same code with a slight modification:
<a href="#disqus_thread">comments</a>
Conclusion
That's it! A simple and effective way to include commenting with social integration on any K2 template.

