Support » How-To and Troubleshooting » Category confusion

Category confusion

  • I’m currently using a slightly variant layouts on my site, depending on the category being displayed. For example, if the user is displaying postings from one category, I want a particular layout, from all the other categories, I want a different layout.

    Everything’s been working great for about six months, but suddenly it’s stopped working. Here’s the code I’m using:

    if (the_category_id($echo=false) == 27) {
    } else {
    $contentWidth=450; ?>
    <div id=”leftads” style=”position:absolute; left:493px; top:154px; width:132px; height:1211px; z-index:3″>
    <div class=”smalltext”><span class=”smalltextfirstword”> Welcome </span>to this site, blah blah blah
    <div class=”leftAdsMenu”>SITE SEARCH</div>
    <form id=”searchform” method=”get” action=”<?php echo $PHP_SELF; ?>”>
    <input type=”text” name=”s” id=”s” size=”15″ />
    <input type=”submit” name=”submit” value=”<?php _e(‘Search’); ?>” />
    <?php include(‘leftadsDiv.php’);?>

    That width variable is then used to specify the width of the main content div that I create later. As I said, everything’s worked fine for the last six months, and the existing content looks normal. As of today, any new posting I make, no matter what category I assign, the conditional statement assumes it’s category 27 and assigns width accordingly.

    The only think I can think I’ve done since the last post was to install two new stat trackers, shortstat, and stat-traq. Other than that, I don’t believe I’ve changed any code. Any ideas?


  • The topic ‘Category confusion’ is closed to new replies.