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:
<?php
if (the_category_id($echo=false) == 27) {
$contentWidth=610;
} 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><br>
<div class=”leftAdsMenu”>SITE SEARCH</div>
<form id=”searchform” method=”get” action=”<?php echo $PHP_SELF; ?>”>
<div>
<input type=”text” name=”s” id=”s” size=”15″ />
<input type=”submit” name=”submit” value=”<?php _e(‘Search’); ?>” />
</div>
</form>
<br>
<?php include(‘leftadsDiv.php’);?>
</div>
<?
}
?>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?
Thanks!
- The topic ‘Category confusion’ is closed to new replies.