Support » Plugin: Disqus Comment System » Using Disqus in a custom theme – problem

  • john_harrison


    Firstly – this plugin is AWESOME. Many thanks!

    I’ve added Disqus into my custom theme using a tutorial on WPTuts (

    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:

    function blog_filter($string, $show) {
        if ( $show == "description" ) {
            $string = str_replace('Text', '<a href="">Text</a>', $string);
    return $string;
    add_filter('bloginfo', 'blog_filter', 10, 2 );
    function disqus_embed($disqus_shortname) {
        global $post;
        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.'";

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


Viewing 1 replies (of 1 total)
  • 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.

Viewing 1 replies (of 1 total)
  • The topic ‘Using Disqus in a custom theme – problem’ is closed to new replies.