Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
<?php get_header(); ?> <!--include sidebar--> <?php include(TEMPLATEPATH."/l_sidebar.php");?> <div id="content"> <!--archive.php--> <!-- Below for alphabetical listing at top of each page --> <?php //if (function_exists('wp_snap')) { echo wp_snap(); } ?> <br /> <?php $query = "SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) INNER JOIN wp_term_taxonomy ON (wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id) LEFT OUTER JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id AND wp_postmeta.meta_key = 'lastname') WHERE 1=1 AND wp_term_taxonomy.taxonomy = 'category' AND wp_term_taxonomy.term_id IN ('5') AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private') GROUP BY wp_posts.ID ORDER BY COALESCE(wp_postmeta.meta_value, post_title) ASC, post_title ASC"; $pageposts = $wpdb->get_results($query, OBJECT); ?> <?php if ( $pageposts ) : // the loop ?> <h1><?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?> <?php /* If this is a category archive */ if (is_category()) { ?> <?php echo single_cat_title(); ?> <?php /* If this is a daily archive */ } elseif (is_day()) { ?> Archive for <?php the_time('F jS, Y'); ?> <?php /* If this is a monthly archive */ } elseif (is_month()) { ?> Archive for <?php the_time('F, Y'); ?> <?php /* If this is a yearly archive */ } elseif (is_year()) { ?> Archive for <?php the_time('Y'); ?> <?php /* If this is a search */ } elseif (is_search()) { ?> Search Results <?php /* If this is an author archive */ } elseif (is_author()) { ?> Author Archive <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?> Blog Archives <?php } //do not delete ?> </h1> <?php foreach ($pageposts as $post) : setup_postdata($post); // the loop ?> <div id="post-<?php the_ID(); ?>" class="thumbnail"> <a href="<?php echo get_permalink() ?>" class="thumbnailer" rel="bookmark" title="<?php the_title(); ?>"><h3 id="post-<?php the_ID(); ?>"><?php the_title(); ?></h3><span><img src="<?php echo get_post_meta($post->ID, "Thumbnail", true); ?>" /></span></a> </div> <?php endforeach; //end one post ?> <!-- Previous/Next page navigation --> <div class="page-nav"> <div class="nav-new"><?php if(function_exists('wp_page_numbers')) { wp_page_numbers(); } ?> </div> <!-- Remove this becuase the new plugin displays page numbers <div class="nav-next"><?php //if(function_exists('wp_page_numbers')) { wp_page_numbers(); } ?> </div> --> </div> <?php else : //do not delete ?> <h3>Page Not Found</h3> <p>We're sorry, but the page you are looking for isn't here.</p> <p>Try searching for the page you are looking for or using the navigation in the header or sidebar</p> <?php endif; //do not delete ?> <!--archive.php end--> </div> <!--include footer--> <?php get_footer(); ?>
This paste will be private.
From the Design Piracy series on my blog: