Advertisement
Guest User

Untitled

a guest
Jan 5th, 2013
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. <?php
  2. /*
  3. * Template Name: Today's Races
  4. */
  5.  
  6. // Add custom body class to the head
  7. add_filter( 'body_class', 'add_body_class' );
  8. function add_body_class( $classes ) {
  9. $classes[] = 'raceselection';
  10. return $classes;
  11. }
  12.  
  13.  
  14.  
  15. add_action( 'genesis_post_content', 'child_do_content' ); // Adds your custom page code/content
  16. function child_do_content() { ?>
  17. <?php query_posts('post_type=picks'); if ( have_posts() ) : ?>
  18. <?php while ( have_posts() ) : the_post(); ?>
  19. <ul>
  20. <li><?php the_title();?></li>
  21. <li><?php echo get_post_meta($post->ID, '_racetrack', true); ?></li>
  22. <li><?php echo get_post_meta($post->ID, '_racedate', true); ?></li>
  23. <li><?php echo get_post_meta($post->ID, '_racedate', true); ?></li>
  24. </ul>
  25. <?php endwhile; ?>
  26. <?php else : ?>
  27. <p><?php _e( '<em>No picks have been made. Check back frequently for the latest picks!</em>'); ?></p>
  28. <?php endif; wp_reset_query() ;?>
  29.  
  30.  
  31.  
  32. <?php }
  33. genesis();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement