Support » Themes and Templates » Conditional Tags in footer.php

  • Hi everyone,

    I want to implement the open source heatmap Clickheat on my blog. There’s a variable called ‘ClickHeatGroup’ in the javascript and I want to populate it with the current pagetype. So I used conditional tags in my footer.php. It doesn’t work. It’s ‘index’ on all pages.

    Any hints?

    Thanks in advance,


    Here my code from the footer.php:

    <!-- Clickheat Clickmap Code -->
        $clickheatgroup = "index";
        $clickheatgroup = "article";
        $clickheatgroup = "page";
        $clickheatgroup = "archive";
        $clickheatgroup = "search";
          $clickheatgroup = "other";
    <script type="text/javascript" src=""></script><noscript><p><a href="">Marketing tools</a></p></noscript><script type="text/javascript"><!--
    clickHeatSite = '';
    clickHeatGroup = '<?php echo $clickheatgroup; ?>';
    clickHeatServer = '';initClickHeat(); //-->
    <!-- Clickheat Ende Footerversion-->
Viewing 3 replies - 1 through 3 (of 3 total)
  • nexen –

    I tested the script on my own site, and it worked just fine. Do you have any kind of cache plug-in running on your site? If you do, try disabling the plug-in and testing again.

    ericmann –

    You’re right. The code is working. But in the theme I’m currently using it doesn’t work. I had WP-Cache, but deactivated it and I still have the same problem. That’s weird. But thank you for your feedback.

    The problem is that on every page in my theme, the conditional tags returns true for is_home() and is_front_page().

    It’s definetly a problem with this theme. Does anyone know what can influence conditional tags in the footer.php? In others themes the code work fine.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Conditional Tags in footer.php’ is closed to new replies.