WordPress.org

Support

Support » Plugins and Hacks » Geek Switch … or turn off some categories

Geek Switch … or turn off some categories

Viewing 3 replies - 1 through 3 (of 3 total)
  • That’s cool. I’m trying to take what you’ve done and “turn off” my counters when I am in Admin mode. I am having one difficulty in getting an error from index.php. Can you help?

    Parse error: parse error, unexpected T_VARIABLE in /home/jimw3141/public_html/wordpress/wp-content/themes/test/index.php on line 6

    <!-- ### Check for geek cookie in index.php file ### -->
    <!-- ### Geek Stuff or not ? ### -->
    <? php
    $dnl_geek = $_COOKIE['geekstuff'];
    if($dnl_geek == 'off') {
    $cat = '-2';
    }
    ?>

    <?php get_header(); ?>

    Looks like you just need to get rid of the space between the “<?” and the “php” maybe.

    <?php, not <? php

    That error could mean that $dnl_geek is undefined. Test for that.

    As an aside, you might benefit from putting your variables after the == when doing logical comparisons. See the Coding Style Guidelines, in the last paragraph.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Geek Switch … or turn off some categories’ is closed to new replies.
Skip to toolbar