Wordpress

Learn how to easily install the Comment System on WordPress using the Universal Snippet so it works across all pages.

Prerequisites

Before you begin, make sure you have:

  • An Arena account.
  • If you don’t have an Arena account, you can access here to create one.
  • Wordpress website.

Step 1: Install and activate the WPCode Plugin

In your WordPress dashboard, go to the Plugins section, search for “WPCode”, then install and activate the plugin.

Step 2: Create a snippet for the Universal Code

Go to the WPCode “Code Snippets” page and click “Add New”.

Then select “+ Add Custom Snippet”.

Then select “PHP Snippet”.

Copy the PHP code below and paste it into the Code Preview area.

// Add Arena.im script to header (loads only once)
add_action('wp_head', function() {
	?>
	<script async src="https://fast.arena.im/script.js?siteId=SITE-ID"></script>
	<?php
});

Go to the Arena dashboard, click on Comment System in the main menu, then go to Installation and click Get code.


Copy and paste the script into WPCode, set the title as “Comment System script”, activate and Save Snippet.

Step 3: Create a snippet for Comment System

In WPCode, create a new PHP Snippet, then copy the two code blocks below and paste them into the Code Preview area.

// Add comments widget after post content
add_filter('the_content', function($content) {
	// Only add widget on single blog posts (not pages or other post types)
    if (is_singular('post') && !is_admin()) {
        global $post;
        
        $arena_widget = '<div class="arena-comments-widget" 
                              data-site-slug="DATA-SITE-SLUG" 
                              data-page-id="' . $post->ID . '"></div>';
        
        // Add widget after content
        $content = $content . $arena_widget;
    }
    
    return $content;
});

Go back to the Arena dashboard and make the necessary replacements in the code as indicated in the provided snippet.

SITE-ID

DATA-SITE-SLUG

Then, activate and Save Snippet.


The Comment System should now appear on all your WordPress pages after the post.


Questions

Reach out to [email protected] or join live support inside the dashboard.