WEB wordpress issue

Discussion in 'OT Technology' started by autox, Mar 6, 2008.

  1. autox

    autox OT Supporter

    Joined:
    Oct 18, 2002
    Messages:
    98,791
    Likes Received:
    453
    I'm trying to change the background color of a certain catagory of posts on my wordpress site, and I found instructions on how to do it exactly here:
    http://www.wpdesigner.com/2007/06/22/styling-posts-by-category-and-category-specific-images/
    but I cant seem to follow them because my theme doesn't have this on the index.php that they are talking about here: <div class="post" id="post-<?php the_ID(); ?>">

    This is what my code looks like instead:
    Code:
    <div id="contentmiddle">
    	<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    		<div class="contentdate">
    		<h3><?php the_time('M'); ?></h3>
    		<h4><?php the_time('j'); ?></h4>
    	</div>
    			
    		<div class="contenttitle">
    			<h2 class="home_title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    Does anyone know where I should put this code to make it work?:
    Code:
    <?php
    foreach((get_the_category()) as $cat)
    {
    echo $cat->category_nicename;
    }
    ?>
    I wish I knew more about this stuff but I just dont really have the time to bother to learn much about it :hs:
     

Share This Page