Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * The default template for displaying content
- *
- * @package WordPress
- * @subpackage Twenty_Eleven
- * @since Twenty Eleven 1.0
- */
- ?>
- <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- <header class="entry-header">
- <h1 class="page-title">
- <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
- </header><!-- .entry-header -->
- <div class="entry-content">
- <?php get_template_part( 'content', 'detail' ); ?>
- <?php $news = get_post_meta($post->ID, 'ecpt_recprogramnews', true); ?>
- <?php $events = get_post_meta($post->ID, 'ecpt_recprogramevents', true); ?>
- <?php $classes = get_post_meta($post->ID, 'ecpt_recprogramclasses', true); ?>
- <?php $title4 = get_post_meta($post->ID, 'ecpt_rectab4title', true); ?>
- <?php $title5 = get_post_meta($post->ID, 'ecpt_rectab5title', true); ?>
- <?php $title6 = get_post_meta($post->ID, 'ecpt_rectab6title', true); ?>
- <?php $title7 = get_post_meta($post->ID, 'ecpt_rectab7title', true); ?>
- <?php $tab4 = get_post_meta($post->ID, 'ecpt_rectab4', true); ?>
- <?php $tab5 = get_post_meta($post->ID, 'ecpt_rectab5', true); ?>
- <?php $tab6 = get_post_meta($post->ID, 'ecpt_rectab6', true); ?>
- <?php $tab7 = get_post_meta($post->ID, 'ecpt_rectab7', true); ?>
- <script>
- jQuery(function() {
- jQuery( "#tabs" ).tabs();
- });
- </script>
- <?php if ($news || $events || $classes != '') {?>
- <div id="tabs">
- <ul>
- <?php if($news != '') { ?> <li><a href="#tabs-1">What's New</a></li> <?php } ?>
- <?php if ($events != '') { ?> <li><a href="#tabs-2">Events</a></li> <?php } ?>
- <?php if($classes != '') { ?> <li><a href="#tabs-3">Classes</a></li> <?php } ?>
- <?php if($title4 != '') { ?> <li><a href="#tabs-4"><?php echo $title4 ?></a></li> <?php } ?>
- <?php if ($title5 != '') { ?> <li><a href="#tabs-5"><?php echo $title5 ?></a></li> <?php } ?>
- <?php if($title6 != '') { ?> <li><a href="#tabs-6"><?php echo $title6 ?></a></li> <?php } ?>
- <?php if($title7 != '') { ?> <li><a href="#tabs-7"><?php echo $title7 ?></a></li> <?php } ?>
- </ul>
- <?php if($news != '') { ?>
- <div id="tabs-1">
- <?php global $post; // required
- $args = array('numberposts'=>7,'post_type' => 'post', 'taxonomy' => 'category', 'term' => $news, 'order'=>'DSC');
- $custom_posts = get_posts($args);
- if ($custom_posts) {
- foreach($custom_posts as $post) : setup_postdata($post); ?>
- <?php get_template_part( 'content', get_post_format() ); ?>
- <?php endforeach; } else { ?>
- <p>Coming soon!</p>
- <?php } ?>
- <?php get_template_part( 'content', 'rsslink' ); ?>
- </div>
- <?php };
- wp_reset_postdata(); ?>
- <?php if ($events != "") { ?>
- <div id="tabs-2">
- <ul>
- <?php
- global $post;
- $all_events = tribe_get_events(
- array(
- 'eventDisplay'=>'upcoming',
- 'posts_per_page'=>10,
- 'tax_query'=> array(
- array(
- 'taxonomy' => 'tribe_events_cat',
- 'field' => 'slug',
- 'terms' => $events
- )
- )
- )
- );
- foreach($all_events as $post) {
- setup_postdata($post);
- ?>
- <li>
- <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
- <span class="event-date"><a href="<?php the_permalink(); ?>"><?php echo tribe_get_start_date($post->ID, true, 'M j, Y'); ?></a></span>
- <?php if ( has_post_thumbnail() ) { ?>
- <div class="event-thumb">
- <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('thumbnail'); ?></a>
- </div>
- <div class="event-excerpt">
- <?php the_excerpt(); ?>
- </div>
- <?php } else { ?>
- <div class="event-content">
- <?php the_content(); ?>
- </div>
- <?php } ?>
- </li>
- <?php } //endforeach ?>
- <?php wp_reset_query(); ?>
- </ul>
- </div>
- <?php } ?>
- <?php if($classes != '') { ?>
- <div id="tabs-3">
- <?php global $post; // required
- $args = array('numberposts'=>-1,'post_type' => 'class', 'taxonomy' => 'parentprogram', 'term' => $classes, 'order'=>'DSC');
- $custom_posts = get_posts($args);
- if ($custom_posts) {
- foreach($custom_posts as $post) : setup_postdata($post); ?>
- <?php get_template_part( 'content', get_post_format() ); ?>
- <?php endforeach; } else { ?>
- <p>Coming soon!</p>
- <?php } ?>
- </div>
- <?php };
- wp_reset_postdata(); ?>
- <?php if($tab4 != '') { ?>
- <div id="tabs-4">
- <?php echo do_shortcode($tab4) ?>
- </div>
- <?php }; ?>
- <?php if($tab5 != '') { ?>
- <div id="tabs-5">
- <?php echo do_shortcode($tab5); ?>
- </div>
- <?php }; ?>
- <?php if($tab6 != '') { ?>
- <div id="tabs-6">
- <?php echo do_shortcode($tab6) ?>
- </div>
- <?php }; ?>
- <?php if($tab7 != '') { ?>
- <div id="tabs-7">
- <?php echo do_shortcode($tab7) ?>
- </div>
- <?php }; ?>
- </div>
- <?php } ?>
- </div><!-- .entry-content -->
- </article><!-- #post-<?php the_ID(); ?> -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement