Forums

Disqus Comment System
Disqus shortcode (7 posts)

  1. Fruitful Code
    Member
    Posted 5 months ago #

    Hello

    I want to add Disqus comment via shortcode on specific page, is that possible?

    http://wordpress.org/extend/plugins/disqus-comment-system/

  2. davidtrounce
    Member
    Posted 5 months ago #

    I have the same question.

  3. freeace00
    Member
    Posted 4 months ago #

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

  4. Fixit
    Member
    Posted 3 months ago #

    I have the same concern...

  5. belgianwolfie
    Member
    Posted 2 months ago #

    put this in your functions.php:

    function disqus_embed($disqus_shortname) {
        global $post;
        wp_enqueue_script('disqus_embed','http://'.$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 : http://ayudawordpress.com/disqus-en-wordpress-sin-necesidad-de-plugin/ I don't speak Spanish :))

  6. jeffqc
    Member
    Posted 2 weeks ago #

    thank, it work :)

  7. KcrK
    Member
    Posted 1 week ago #

    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?

Reply

You must log in to post.

About this Plugin

About this Topic