Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- * Template Name: Today's Races
- */
- // Add custom body class to the head
- add_filter( 'body_class', 'add_body_class' );
- function add_body_class( $classes ) {
- $classes[] = 'raceselection';
- return $classes;
- }
- add_action( 'genesis_post_content', 'child_do_content' ); // Adds your custom page code/content
- function child_do_content() { ?>
- <?php query_posts('post_type=picks'); if ( have_posts() ) : ?>
- <?php while ( have_posts() ) : the_post(); ?>
- <ul>
- <li><?php the_title();?></li>
- <li><?php echo get_post_meta($post->ID, '_racetrack', true); ?></li>
- <li><?php echo get_post_meta($post->ID, '_racedate', true); ?></li>
- <li><?php echo get_post_meta($post->ID, '_racedate', true); ?></li>
- </ul>
- <?php endwhile; ?>
- <?php else : ?>
- <p><?php _e( '<em>No picks have been made. Check back frequently for the latest picks!</em>'); ?></p>
- <?php endif; wp_reset_query() ;?>
- <?php }
- genesis();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement