WordPress Installation Guide

Follow these simple steps to add the LiveChat widget to your WordPress website. Choose the method that works best for you.

📝 Other Guides: General | WooCommerce | Shopify | All Guides
📋 Before You Begin:
  • Log in to your LiveChat Dashboard and get your Account ID
  • Make sure you have admin access to your WordPress site
  • We recommend backing up your site before making changes
  • Replace YOUR_COMPANY_ID in the code below with your actual Account ID
  • Official Domain: Use https://poplivechat.com for production deployment

Method 1: Using a Plugin (Recommended - Easiest)

This is the safest method - your code won't be lost when you update your WordPress theme.

Step 1: Install the Plugin

Log in to your WordPress admin panel → Go to Plugins → Add New

Search for "Insert Headers and Footers" by WPBeginner → Click Install Now → Click Activate

Step 2: Add the Code

Go to Settings → Insert Headers and Footers

Copy the code below and paste it into the "Scripts in Footer" section:

<!-- LiveChat Chat Widget - WordPress Integration -->
<script>
    // Defer loading of LiveChat widget until page is fully loaded
    (function() {
        function loadLiveChatWidget() {
            // Load CSS dynamically
            var cssLink = document.createElement('link');
            cssLink.rel = 'stylesheet';
            cssLink.href = 'https://poplivechat.com/css/chat-widget.css';
            cssLink.media = 'all';
            document.head.appendChild(cssLink);
            
            // Load JS dynamically
            var jsScript = document.createElement('script');
            jsScript.src = 'https://poplivechat.com/js/chat-widget.js';
            jsScript.async = true;
            jsScript.onload = function() {
                // Initialize chat widget after script loads
                window.LiveChatWidget.init({
                    companyId: 'YOUR_COMPANY_ID',
                    buttonText: '💬 Chat Now',
                    buttonPosition: 'bottom-right',
                    primaryColor: '#667eea'
                });
            };
            document.body.appendChild(jsScript);
        }
        
        // Wait for full page load before loading chat widget
        if (window.addEventListener) {
            window.addEventListener('load', loadLiveChatWidget, false);
        } else if (window.attachEvent) {
            window.attachEvent('onload', loadLiveChatWidget);
        } else {
            window.onload = loadLiveChatWidget;
        }
    })();
</script>

⚠️ Important: Replace YOUR_COMPANY_ID with your actual Account ID (e.g., XU22). The official domain is poplivechat.com.

Click Save when done.

Step 3: Test Your Installation

Visit your WordPress website and look for the chat button in the bottom-right corner. Click it to verify it works!

✅ Why This Method is Best:
  • ✅ Code persists through theme updates
  • ✅ Easy to enable/disable
  • ✅ No need to edit theme files
  • ✅ Safe and user-friendly

Method 2: Edit Theme Footer (Alternative)

If you prefer not to use a plugin, you can edit your theme's footer file directly.

Step 1: Open Theme Editor

Go to Appearance → Theme File Editor in your WordPress admin

Note: If you don't see "Theme File Editor", you may need to enable it in your wp-config.php file by adding: define('DISALLOW_FILE_EDIT', false);

Step 2: Edit footer.php

Select footer.php from the file list on the right side

Scroll to the bottom and find the closing </body> tag

Step 3: Paste the Code

Paste the code from Method 1, Step 2 just before the </body> tag

Click Update File to save

⚠️ Important:

If you update your WordPress theme, code added to footer.php will be lost. We recommend using Method 1 (Plugin) instead to avoid this issue.

Troubleshooting

Chat widget not appearing?

  • Check that the code is placed before the </body> tag
  • Verify your Account ID is correct in the code
  • Try clearing WordPress and browser cache
  • Check browser console (F12) for JavaScript errors
  • Disable other plugins temporarily to check for conflicts

Need Help?

If you encounter any issues during installation, please contact our support team:

📧 Email: contact@items7.com
🏠 Access Dashboard | All Installation Guides