Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: Class Listings
- */
- get_header(); ?>
- <div id="navcontainer">
- <?php get_template_part( 'menu', 'primary' ); // Loads the menu-primary.php template. ?>
- </div><!-- navcontainer -->
- </div><!-- navbar -->
- <div class="wrapper">
- <div class="container container_11">
- <div class="grid_11" style="margin:8px 12px 18px 20px;" >
- <h2 class="section" span style="font-weight:bold"> Class Listings</span></h2>
- <table width="825" cellpadding="3" cellspacing="3" border="0" class="padded-table">
- <thead>
- <tr>
- <th>Title</th>
- <th>Description</th>
- <th>Instructor </th>
- <th>Category </th>
- <!--
- <th>Days</th>
- <th>Time</th>
- -->
- </tr>
- </thead>
- <tbody>
- <?php
- $paged = (get_query_var('paged')) ? get_query_var('paged') :
- ((get_query_var('page')) ? get_query_var('page') : 1);
- query_posts("posts_per_page=8&cat=4&orderby=title&order=ASC&paged=$paged");
- while (have_posts()) : the_post() ;
- ?>
- <tr>
- <td style="vertical-align: top; width: 15%;"><p > <a href="<?php the_permalink(); ?>" style="text-decoration:underline;"> <?php the_title(); ?></a></p></td>
- <td style="vertical-align: top; width: 50%;"><p > <?php the_excerpt(); ?></p></td>
- <td style="vertical-align: top; width: 20%;"><p >
- <?php if (in_category (5 6 7 8 9 10)) {
- echo
- }
- else
- echo '' ;
- ?>
- </p>
- </td>
- <td style="vertical-align: top; width: 15%;"><p ><?php $category = get_the_category(); echo $category[0]->cat_name;?> </p></td>
- </tr>
- <?php endwhile; ?>
- <?php if ($wp_query->max_num_pages > 1 ) : ?>
- <div id="nav-below" class="navigation" style="margin-bottom:6px;">
- <?php pagination('Prev','Next'); ?>
- </div><!-- #nav-below -->
- <?php endif; ?>
- </tbody>
- </table>
- <p>Click title names for class details.</p>
- </div><!-- grid 11 -->
- <div class='clear'> </div>
- </div><!-- container -->
- </div><!-- wrapper -->
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement