lberelson

custom3 - classlist

Jan 28th, 2014
62
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /*
  3. Template Name: Class Listings
  4. */
  5. get_header(); ?>
  6. <div id="navcontainer">
  7.  
  8. <?php get_template_part( 'menu', 'primary' ); // Loads the menu-primary.php template.  ?>
  9.  
  10. </div><!-- navcontainer -->
  11. </div><!-- navbar -->
  12.  
  13.  
  14. <div class="wrapper">
  15.  
  16. <div class="container container_11">
  17.  
  18. <div class="grid_11" style="margin:8px 12px 18px 20px;" >
  19.  
  20. <h2 class="section" span style="font-weight:bold"> Class Listings</span></h2>
  21.  
  22. <table width="825" cellpadding="3" cellspacing="3" border="0" class="padded-table">
  23.  
  24. <thead>
  25. <tr>
  26. <th>Title</th>
  27. <th>Description</th>
  28. <th>Instructor </th>
  29.  
  30. <th>Category </th>
  31.  
  32. <!--
  33. <th>Days</th>
  34. <th>Time</th>
  35. -->
  36.  
  37. </tr>
  38. </thead>
  39. <tbody>
  40.  
  41. <?php
  42. $paged = (get_query_var('paged')) ? get_query_var('paged') :
  43.    ((get_query_var('page')) ? get_query_var('page') : 1);
  44. query_posts("posts_per_page=8&cat=4&orderby=title&order=ASC&paged=$paged");  
  45. while (have_posts()) : the_post() ;
  46. ?>
  47.  
  48. <tr>
  49. <td style="vertical-align: top; width: 15%;"><p > <a href="<?php the_permalink(); ?>" style="text-decoration:underline;"> <?php the_title(); ?></a></p></td>
  50.  
  51. <td style="vertical-align: top; width: 50%;"><p > <?php the_excerpt(); ?></p></td>
  52.  
  53. <td style="vertical-align: top; width: 20%;"><p >
  54. <?php if (in_category (5 6 7 8 9 10)) {
  55.     echo
  56.     }
  57.     else
  58. echo '' ;
  59.  
  60.  
  61. ?>
  62.  
  63. </p>
  64. </td>
  65.  
  66. <td style="vertical-align: top; width: 15%;"><p ><?php $category = get_the_category(); echo $category[0]->cat_name;?> </p></td>
  67.  
  68. </tr>
  69.  
  70. <?php endwhile;  ?>
  71.  
  72. <?php if ($wp_query->max_num_pages > 1 ) : ?>
  73. <div id="nav-below" class="navigation" style="margin-bottom:6px;">
  74. <?php pagination('Prev','Next'); ?>
  75. </div><!-- #nav-below -->
  76. <?php endif; ?>
  77. </tbody>
  78.  
  79. </table>
  80.  
  81. <p>Click title names for class details.</p>
  82.  
  83.  
  84.  
  85.  
  86. </div><!-- grid 11 -->
  87.  
  88. <div class='clear'>&nbsp;</div>
  89.  
  90. </div><!-- container -->
  91. </div><!-- wrapper -->
  92.  
  93.  
  94. <?php get_footer(); ?>
RAW Paste Data