Advertisement
inTOWN

Untitled

Oct 30th, 2011
2,125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.23 KB | None | 0 0
  1. <?php /* Template Name: loop-events */ ?>
  2. <section id="events">
  3. <div id="content"> 
  4. <div class="container">
  5.  
  6. <hgroup>
  7.     <h1><div class="icon"></div><span class="title">Events</span></h1>
  8.     <div class="banner">Latest scopes</div>
  9. </hgroup>
  10.  <div class="main">  
  11. <!--First I made a header and tried to make dropdowns-->
  12.  <table id="dropdown">
  13. <tr>
  14.    <th class="eventimg">Img</th>
  15.    <th class="date">Date</th>
  16.    <th class="event drop"> Events<div class="dropdown"><?php wp_nav_menu('menu=events'); ?></div></th>
  17.     <th class="location">Venue<div class="dropdown"><?php wp_nav_menu('menu=venues'); ?> </div></th>
  18.     <th class="country drop">Country <div class="dropdown">Countries</div></th>
  19.     <th class="category drop">Categories<div class="dropdown"><?php wp_nav_menu('menu=categories'); ?></div></th>
  20.     </tr>
  21. </table>
  22.  
  23. <!--Here comes the loop with tribe_events post type-->
  24. <?php $loop = new WP_Query( array( 'post_type' => 'tribe_events', 'posts_per_page' => 10, 'orderby' => 'date', 'order' => 'ASC', 'paged' ) ); ?>
  25.  
  26. <!--Upcoming events-->
  27. <table id="list">
  28. <tr>
  29. <?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
  30. <?php get_post_meta($post->ID, 'events', true); ?>
  31.  
  32.         <td class="eventimg"><a href="<?php the_permalink(); ?>"><?php if ( has_post_thumbnail() ) the_post_thumbnail('small-list-thumbnail'); ?></a></td >
  33.         <td class="date"><?php echo tribe_get_start_date( null, false, 'd.m' ); ?> </span>
  34.         <td class="event">  <?php the_title('<a href="' . tribe_get_event_link() . '" title="' . the_title_attribute('echo=0') . '" rel="bookmark">', '</a>'); ?> </td >
  35.         <td class="location"> <?php  $venue = tribe_get_venue();  if ( !empty( $venue ) ) : ?><?php echo $venue; ?> <?php endif; ?></td >
  36.         <td class="country"> <?php  $country = tribe_get_country();  if ( !empty( $country ) ) : ?><?php echo $country; ?> <?php endif; ?></td >
  37.         <td class="category"> <?php $category = tribe_meta_event_cats(' ',', '); if ( !empty( $category ) ) :?><?php echo $category; ?><?php endif; ?></td >
  38.         </tr>
  39.    
  40. <?php endwhile; ?>
  41.  </table>
  42. </div><!--End main-->
  43. <div class="main">
  44. </div>
  45. </div><!--End Container-->
  46.  
  47. <?php get_sidebar('events'); ?>
  48. <div class="clear"></div>
  49. </section>
  50.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement