Skip to content

Disqus doesn't work anymore, how can I fix that? #31

Answered by PaperStrike
PaperStrike asked this question in Q&A
Discussion options

You must be logged in to vote

Below shows 3 methods you may choose from.

In a refresh area (method 1)

  1. Wrap your Disqus snippet into a DOM element that you will add to the selector option (or just wrap it with class=".pjax"). Make sure to have at least an empty wrapper on each page (to avoid differences of DOM between pages).

  2. Edit your Disqus snippet like below.

<div class="pjax"><!-- needs to be here on every Pjax page, even if empty -->
<!-- if (some condition) { // eventual server-side test to know whether or not you include this script -->
  <script>
    const disqus_shortname = 'YOUR_SHORTNAME';
    const disqus_identifier = 'PAGE_ID';
    const disqus_url = 'PAGE_URL';
    const disqus_script = 'embed.js';

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by PaperStrike
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant