< Back to Code Samples
<?php
/*****************
This file is the index.php theme template for the Athletics theme. I designed
it for the IU East Athletics department: http://www.iue.edu/athletics/
I had originally debated putting up some hacked Wordpress themes, but didn't think
they would be relevant until you mentioned templating.
******************/
get_header(); // Opens div#container ?>
<div id="main">
<?php get_sidebar(); ?>
<div id="body">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); if (in_category('9')): continue; endif; ?>
<div class="post" id="post-<?php the_ID(); ?>">
<h1>
<a href="<?php the_permalink() ?>"
rel="bookmark"
title="Permanent Link to <?php the_title(); ?>">
<?php the_title(); ?>
</a>
</h1>
<span class="byline">
<?php the_time('F jS, Y') ?> by
<?php the_author_firstname(); echo " "; the_author_lastname(); ?>
</span>
<div class="entry">
<?php // Show excerpts if you're viewing back-issue articles
if(is_category() || is_archive() || is_home()) {
the_excerpt_reloaded("75","<a><img><strong>","","","","","2");
} else {
the_content();
}
?>
</div>
<p class="postmetadata">
Found in <?php the_category(', ') ?> |
<?php edit_post_link('Edit', '', ' | '); ?>
<?php comments_popup_link(
'Be the first to Comment!',
'Only One Comment',
'% Comments');
?>
</p>
</div> <!-- the post -->
<?php endwhile; // End "the Loop" // ?>
<div id="pastarticles">
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); }
else { ?>
<div class="left"><?php next_posts_link('« Previous') ?></div>
<div class="right"><?php previous_posts_link('Next »') ?></div>
<?php } ?>
</div>
<?php else: ?>
<!-- User trying to access bunk data -->
<h1 class="center">Not Found</h1>
<p class="center">Sorry, but you are looking for something that isn't here.</p>
<?php include (TEMPLATEPATH . "/searchform.php"); ?>
<!-- end 404 -->
<?php endif; ?>
</div> <!-- div#body -->
<div id="rightnav">
<?php if (is_home()) { ?>
<img src="<?php bloginfo('template_directory'); ?>/images/events-header.jpg" alt="EVENTS" />
<div id="events">
<?php
ec3_get_events(3);
ec3_get_calendar();
<b class="bottom">
<b class="b4"
style="background: #E6FF8C;
border-left: 1px solid #465708;
border-right: 1px solid #465708;"></b>
<b class="b3"
style="background: #E6FF8C;
border-left: 1px solid #465708;
border-right: 1px solid #465708;"></b>
<b class="b2"
style="background: #E6FF8C;
border-left: 1px solid #465708;
border-right: 1px solid #465708;"></b>
<b class="b1"
style="background-color: #465708;"></b>
</b>
</div> <!-- events -->
<div id="athleteoftheweek">
<?php
$athlete = new WP_Query('category_name=athlete-of-the-week&showposts=1');
$athlete->the_post(); ?>
<img src="<?php bloginfo('template_directory'); ?>/images/aotw_header.gif"
alt="Athlete of the week"
width="192"
height="45"
class="header" />
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<div id="aotw_content">
<?php the_content(); ?>
</div>
<div id="aotw_readmore">
<a href="http://www.iue.edu/athletics/index.php/category/athlete-of-the-week/">
See past Athletes »
</a>
</div>
<b class="bottom">
<b class="b4"
style="background: #E6FF8C;
border-left: 1px solid #465708;
border-right: 1px solid #465708;"></b>
<b class="b3"
style="background: #E6FF8C;
border-left: 1px solid #465708;
border-right: 1px solid #465708;"></b>
<b class="b2"
style="background: #E6FF8C;
border-left: 1px solid #465708;
border-right: 1px solid #465708;"></b>
<b class="b1"
style="background-color: #465708;"></b>
</b>
</div> <!-- athleteoftheweek -->
<?php } else { // else if not is_home() // ?>
<?php } // end is_home -> else ?>
<div style="background: white;">
</div>
</div> <!-- div#rightnav -->
<div style="clear: both;"> </div>
</div> <!-- div#main -->
<?php get_footer(); ?>
</body>
</html>