3 colums display
-
Greetings, I’m new to php, and I’ve been given a theme by my professor, that I should explore before modifying and adding stuff.
To start with, I have a problem with the 3 colums display. Apparently, it’s because of category ids, which where fixed in mysql database differently than at my professor’s database.Each column is supposed to display one category.
I’ve been able to get 2 colums working, center and right colums, each displaying posts from one category (in the code below, categories 4 and 3)Now I’ve still have one category id to modify somewhere in my theme files, but I’m being unable to find which one.
The 3rd column now displays Meta data
I belive it all depends on how the 3 colums display has been defined, but how can I find that out?? where should I look. I did lots of greps looking for “category”, “in_category”, “cat”, …. with no luck…
<?php get_header(); ?> <div id="content"> <div id="content-home-left"> <?php $HomePagePosts = new WP_Query(); $HomePagePosts->query('cat=4'); ?> <?php if ($HomePagePosts->have_posts()) : ?> <?php while ($HomePagePosts->have_posts()) : $HomePagePosts->the_post(); ?> <?php if (in_category('4')) : ?> <div class="post" id="post-<?php the_ID(); ?>"> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> </div> <?php endif; ?> <?php endwhile; ?> <?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php include (TEMPLATEPATH . "/searchform.php"); ?> <?php endif; ?> </div><!-- fin content-home-left --> <div id="content-home-right"> <?php $HomePagePosts = new WP_Query(); $HomePagePosts->query('cat=3'); ?> <?php if ($HomePagePosts->have_posts()) : ?> <?php while ($HomePagePosts->have_posts()) : $HomePagePosts->the_post(); ?> <?php if (in_category('3')) : ?> <div class="post" id="post-<?php the_ID(); ?>"> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> </div> <?php endif; ?> <?php endwhile; ?> <?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php include (TEMPLATEPATH . "/searchform.php"); ?> <?php endif; ?> </div><!-- fin content-home-right --> </div> <?php get_sidebar(); ?> <?php get_footer(); ?>
- The topic ‘3 colums display’ is closed to new replies.