WordPress.org

Ready to get started?Download WordPress

Forums

Disqus Comment System
Using Disqus in a custom theme - problem (2 posts)

  1. john_harrison
    Member
    Posted 1 year ago #

    Firstly - this plugin is AWESOME. Many thanks!

    I've added Disqus into my custom theme using a tutorial on WPTuts (http://wp.tutsplus.com/tutorials/plugins/integrating-disqus-into-wordpress/).

    However, when I add this code into my functions.php file, the site runs fine, but when I try and log out of wp-admin, I get a blank screen.

    This is the full content of my functions.php file:

    <?php
    function blog_filter($string, $show) {
        if ( $show == "description" ) {
            $string = str_replace('Text', '<a href="http://www.website.com/">Text</a>', $string);
        }
    return $string;
    }
    add_filter('bloginfo', 'blog_filter', 10, 2 );
    ?>
    
    <?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>';
    }
    ?>

    Can anyone please help? I'm so close!!

    Thanks
    John

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

  2. kwilson2
    Member
    Posted 10 months ago #

    Was this ever resolved? I'm having trouble with Disqus on a custom theme and I don't want to revert to the universal code solution just yet.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic