WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

User:Matt/photomatt.net/index.php

<?php require('header.php'); ?>
<?php if ( is_home() ) : ?>
<div id="bar">
<p>Timely Dozen <a href="/portal/" title="See the rest of my links">»</a><br />
  <a href="http://gmpg.org/xfn/"><img src="/dropbox/2003/12/xfn-btn.gif" alt="XFN Friendly" /></a></p>
<ul>
<?php get_links(1, "\t<li>", '</li>', '', 0, '_updated', 0, 0, 12, 1); ?>
</ul>
</div>
<?php endif; ?>

<?php if ( is_archive() ) : ?>
<p><strong>The archive page you are viewing contains only excerpts of each post. To view the full post, click on its title.</strong></p>
<?php endif; ?>

<?php
if ($posts) {
function stupid_hack($str) {
	return preg_replace('|</ul>\s*<ul class="asides">|', '', $str);
}
ob_start('stupid_hack');
foreach($posts as $post) {
start_wp();
?>

<?php if ( in_category(33) && !is_single() ) : ?>
<ul class="asides">
<li id="p<?php the_ID(); ?>"><?php echo wptexturize($post->post_content); ?> <span><?php comments_popup_link('(0)', '(1)', 
'(%)')?> <a href="<?php the_permalink(); ?>" title="Permalink: <?php echo wptexturize(strip_tags(stripslashes($post->post_title), '')); ?>" rel="bookmark">¶</a> <?php edit_post_link('(e)'); ?></span></li>
</ul>
<?php else: // If it's a regular post or a permalink page ?>

<?php if ( is_single() ) : ?>
<div class="nextprev"><span class="prev"><?php previous_post('« %', '');?></span> <span class="next"><?php next_post('% »', ''); ?></span></div>
<?php endif; ?>

<div id="p<?php the_ID(); ?>">
	<h2 class="title" style="background: no-repeat url(/css/dante/title/<?php echo urlencode(urlencode(str_replace(' ', '_', stripslashes(wptexturize(strip_tags($post->post_title)))))); ?>.png);"><a href="<?php permalink_link() ?>" title="Permalink: <?php echo wptexturize(strip_tags(stripslashes($post->post_title), '')); ?>" rel="bookmark" ><?php the_title(); ?></a></h2>
	<ul class="meta">
		<li class="when"><a href="/<?php the_time('Y'); ?>/<?php the_time('m'); ?>/"><?php the_time('F'); ?></a> <a href="/<?php the_time('Y'); ?>/<?php the_time('m'); ?>/<?php the_time('j'); ?>/"><?php the_time('jS'); ?></a>, <a href="/<?php the_time('Y'); ?>/"><?php the_time('Y'); ?></a> <?php the_time('g:i a') ?> <?php edit_post_link(); ?></li>
		<li class="where">File under: <?php the_category() ?></li>
	</ul>

<div class="poststuff">	
<?php
if ( is_archive() ) : // Only show excerpts on archive pages
	the_excerpt();
else :
	the_content();
endif;
?>
</div>

<?php if ($single) { ?>
<div class="nextprev"><span class="prev"><?php previous_post('« %', '');?></span> <span class="next"><?php next_post('% »', ''); ?></span></div>
<?php } ?>

	<div class="talkback">
<?php comments_popup_link('Comment »', '1 Comment »', '% Comments »'); ?>
	</div>
	<?php comments_template(); ?>

<?php if ( is_single() ) : ?>
<div class="nextprev"><span class="prev"><?php previous_post('« %', '');?></span> <span class="next"><?php next_post('% »', ''); ?></span></div>
<?php endif; ?>

</div>

<?php endif; // end if in category ?>
<?php
}
} else {
echo '<p>Sorry no posts found.</p>';
}
?>

<?php posts_nav_link(' — ', __('« Previous Page'), __('Next Page »')); ?>

<?php require('footer.php'); ?>