Created
December 23, 2013 15:46
-
-
Save superlou/8099261 to your computer and use it in GitHub Desktop.
Wordpress frontpage bottlneck
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Template Name: Front for LMCTV | |
*/ | |
global $meta; | |
$meta = get_post_custom(); // Custom fields | |
?> | |
<?php //get_header(); ?> | |
<!--<?php get_template_part('_front-slider-lmctv'); ?>--> | |
<?php while (have_posts()) : the_post(); ?> | |
<div id="page" class="front"> | |
<div id="page-inner" class="container fix"> | |
<div id="content"> | |
<div id="entry-<?php the_ID(); ?>" <?php post_class('entry fix'); ?>> | |
<div class="text"> | |
<?php //the_content(); ?> | |
<div class="clear"></div> | |
</div> | |
</div> | |
</div><!--/content--> | |
</div><!--/page-inner--> | |
</div><!--/page--> | |
<!-- Don't show news | |
<div id="front-blog"> | |
<div id="front-blog-inner" class="front container fix"> | |
<?php get_template_part('_front-articles-lmctv'); ?> | |
</div> | |
</div> | |
<div class="clear"></div> | |
--> | |
<!-- | |
<div id="front-portfolio" class="front"> | |
<div id="front-portfolio-inner" class="container fix"> | |
<?php get_template_part('_front-cablecast-playing'); ?> | |
</div> | |
</div> | |
<div class="clear"></div> | |
<div id="front-portfolio" class="front"> | |
<div id="front-portfolio-inner" class="container fix"> | |
<?php get_template_part('_front-social-feeds'); ?> | |
</div> | |
</div> | |
<div class="clear"></div> | |
<div id="front-portfolio" class="front"> | |
<div id="front-portfolio-inner" class="container fix"> | |
<?php get_template_part('_front-videos-lmctv'); ?> | |
</div> | |
</div> | |
<div class="clear"></div> | |
<div id="front-portfolio" class="front"> | |
<div id="front-portfolio-inner" class="container fix"> | |
<?php get_template_part('_front-cablecast-carousel'); ?> | |
</div> | |
</div> | |
<div class="clear"></div> | |
--> | |
<!-- | |
<?php | |
// Is portfolio enabled on front page ? | |
if(isset($meta['_front_portfolio_enable'])) { | |
// Set portfolio layout | |
$p_layout = isset($meta['_front_portfolio_layout'])?$meta['_front_portfolio_layout'][0]:'_front-portfolio-1'; | |
// Get portfolio template | |
get_template_part($p_layout); | |
} | |
// Is blog enabled on front page ? | |
if(isset($meta['_front_blog_enable'])) { | |
// Set blog layout | |
$b_layout = isset($meta['_front_blog_layout'])?$meta['_front_blog_layout'][0]:'_front-blog-1'; | |
// Get blog template | |
get_template_part($b_layout); | |
} | |
?> | |
--> | |
<?php endwhile; ?> | |
<?php //get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment