Viewing 10 replies - 1 through 10 (of 10 total)
  • I have the same question.

    me too i have same question.
    what’s shorcode?

    I have the same concern…

    put this in your functions.php:

    function disqus_embed($disqus_shortname) {
        global $post;
        wp_enqueue_script('disqus_embed','https://'.$disqus_shortname.'.disqus.com/embed.js');
        echo '<div id="disqus_thread"></div>
        <script type="text/javascript">
            var disqus_shortname = "'.$disqus_shortname.'";
            var disqus_title = "'.$post->post_title.'";
            var disqus_url = "'.get_permalink($post->ID).'";
            var disqus_identifier = "'.$disqus_shortname.'-'.$post->ID.'";
        </script>';
    }

    and then this on the spot where you want to have disqus:

    <?php disqus_embed('THE SHORTNAME OF YOUR DISQUS'); ?>

    (credits go to this guy : https://ayudawordpress.com/disqus-en-wordpress-sin-necesidad-de-plugin/ I don’t speak Spanish :))

    thank, it work ??

    Hi,
    i’ve added this code to functions.php file in theme folder. I need to put a Disqus comments only on one page (ex. Comments), which use a fullwidth page template, so i must change other pages template to pages with sidebar. And i have an error:

    Warning: Cannot modify header information - headers already sent by (output started at /wp-content/themes/volt/functions.php:476) in /wp-includes/pluggable.php on line 876

    Line 876 of pluggable.php:

    header("Location: $location", true, $status);
    }
    endif;

    Any ideas what’s wrong?

    well it’s probably sth on the line 476 of yours theme functions.php file ??

    Hi,

    I found disqus didn’t come up in my latest post.
    any idea how I can add comment on any post not showing it?

    Would it be a conflict with other plugins that’s causing the comment box not to show?

    Thanks in advance

    I have managed to resolve this by playing around all the settings even though I never touched any of them before or during the post.

    In case anyone is having a similar problem, I clicked on discussion on the post edit screen and clicked on comment before saving or updating the post.

    It is now working thank God.

    Volatileangel

    (@volatileangel)

    Oh my gosh, thank you so much for this discussion, after days of trying to add a comment section to the WP-Creativix Portfolio pages I have finally done it!

    Thanks again.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Disqus shortcode’ is closed to new replies.