Skip to content

Display ​

The Display page has two parts: Comment counts, and Comment section for where Disqus never shows and how wide the thread is.

Show Disqus comment counts ​

Setting key: dcl_gnrl_options.dcl_count_disable · Default:1 (on)

Themes print comment-count links such as "12 Comments" on archives and posts. WordPress counts only its own comments, so on a Disqus site those links say "No Comments" or show a stale number. With this on, the plugin swaps in the Disqus count.

How it works:

  • The count text from WordPress's comments_number is wrapped in a <span class="dsq-postid"> marker carrying the post's Disqus identifier.
  • Links around those markers are pointed at #disqus_thread.
  • Disqus's count.js is loaded once and fills in the numbers. It loads only on pages that actually print a count.

Counts show on archives and listings too, not only where the thread loads. Posts that don't show the Disqus thread keep the WordPress count: posts with comments closed (including old posts WordPress closes automatically), password-protected posts until the password is entered, and excluded post types. Counts need a shortname and are never added to feeds.

Turn it off to keep WordPress's own counts, or if you want no request to Disqus on archive pages. If your theme shows no counts, no count script loads, so leaving it on costs nothing.

The key name is inverted

The setting is stored as dcl_count_disable, but 1 means counts are shown. The name is kept from older versions so existing settings carry over.

Block themes ​

Counts come from the classic comments_number output. The Comments Count and Comments Link blocks in block themes may not use it, in which case they keep showing the WordPress count.

Exclude post types ​

Setting key: dcl_gnrl_options.dcl_cpt_exclude · Default: empty

Post types that should never show Disqus, as a comma-separated list of slugs — for example page, attachment. Slugs are lower-cased and anything that isn't a valid slug is dropped when you save.

Excluded post types keep your theme's normal WordPress comments.

To find a post type's slug, open its list screen in the admin and look at the address: edit.php?post_type=product → product. Posts are post, pages are page.

WooCommerce products

Products are always left out while WooCommerce is active, so product reviews keep working, even though product isn't in this list. The Comments for WooCommerce add-on brings Disqus to product pages. If you add product here yourself, the add-on respects it.

To show Disqus only on some posts of a type, close comments on the others: Disqus follows each post's Allow comments setting.

Comments width ​

Setting keys: dcl_div_width, dcl_div_width_type · Default: empty (theme width), px

Limit the width of the Disqus thread and centre it. Enter a number and pick the Width unit: Pixels (px) or Percent of the content area (%). Leave it empty to use your theme's width.

When set, the plugin adds this CSS on pages where Disqus loads:

css
#disqus_thread { width: 700px; margin: 0 auto; }