Skip to content

coralproject/talk-wp-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coral WP Plugin

This plugin replaces standard WordPress commenting with Coral by Vox Media. Coral is an open-source commenting platform that rethinks how moderation, comment display, and conversation function, creating the opportunity for safer, smarter discussions.

Setup

First, you'll need a server running your own instance of Coral. See the Coral Docs for more info about that.

Then you will need to:

  1. Add the hostname of your WordPress site to the whitelist in the settings of your Coral instance.
  2. Install and activate this plugin as you would any other WordPress plugin.
  3. Go to https://mysite.com/wp-admin/options-general.php?page=talk-settings
  4. Add the URL of your Coral instance to Server Base URL in Settings and click Save.
  5. Review and complete any further Settings and click Save.

Story settings

The plugin supports enabling canonical URLs for a Wordpress post to be passed through to the Coral stream embed as the story URL.

The plugin also supports setting a story mode and sending it through to the Coral stream embed. To use, you can add a custom field in Wordpress called coralStoryMode and then set it to a valid story mode.

HTTPS and Dev Mode

Your site must be served over https in order to integrate with Coral unless Coral is set to dev mode.

If you're installing Coral with Docker, you can do that by adding NODE_ENV=development to the environment variables in your docker-compose.yml. Otherwise, any method of setting NODE_ENV=development will do the trick.

Theme usage

If your theme uses WordPress' standard comments_template() to render comments forms, the output will be overridden by the Coral embed code.

If you are building a custom theme, we recommend using coral_talk_comments_template() instead of the usual comments_template() for performance reasons.

Note that comments can still be turned on or off for an invidual post:

Discussion meta box

comments_open() will still work when the Coral Plugin is active, but other functions like get_comments_number() that reference the wp_comments database table may not.

We recommend something like:

if ( comments_open() ) {
	coral_talk_comments_template();
}

AMP support

Coral v4.9.0+ comes with AMP support. This plugin automatically integrates with AMP for WP and adds the AMP version of Coral to the comments. Don't forget to disable the other comments integrations inside of AMP -> Settings.

If you are building a custom theme, you can use coral_talk_comments_amp_template() to add the Coral AMP Iframe.

Version

Coral version <= v3.9.1 use plugin version v0.0.6

Coral version >= 4.0.0 use plugin version v0.1.0

Coral version >= 5.0.0 use plugin version v1.0.0