Created
October 19, 2013 01:06
-
-
Save anonymous/7050531 to your computer and use it in GitHub Desktop.
page.php
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 get_header(); ?> | |
<?php | |
if(get_post_meta($post->ID, 'pyre_full_width', true) == 'yes') { | |
$content_css = 'width:100%'; | |
$sidebar_css = 'display:none'; | |
} | |
elseif(get_post_meta($post->ID, 'pyre_sidebar_position', true) == 'left') { | |
$content_css = 'float:right;'; | |
$sidebar_css = 'float:left;'; | |
} elseif(get_post_meta($post->ID, 'pyre_sidebar_position', true) == 'right') { | |
$content_css = 'float:left;'; | |
$sidebar_css = 'float:right;'; | |
} elseif(get_post_meta($post->ID, 'pyre_sidebar_position', true) == 'default') { | |
if($data['default_sidebar_pos'] == 'Left') { | |
$content_css = 'float:right;'; | |
$sidebar_css = 'float:left;'; | |
} elseif($data['default_sidebar_pos'] == 'Right') { | |
$content_css = 'float:left;'; | |
$sidebar_css = 'float:right;'; | |
} | |
} | |
if(class_exists('Woocommerce')) { | |
if(is_cart() || is_checkout() || is_account_page() || is_page(get_option('woocommerce_thanks_page_id'))) { | |
$content_css = 'width:100%'; | |
$sidebar_css = 'display:none'; | |
} | |
} | |
?> | |
<div id="content" style="<?php echo $content_css; ?>"> | |
<?php if(have_posts()): the_post(); ?> | |
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> | |
<?php global $data; if(!$data['featured_images_pages'] && has_post_thumbnail()): ?> | |
<div class="image"> | |
<?php the_post_thumbnail('blog-large'); ?> | |
</div> | |
<?php endif; ?> | |
<div class="post-content"> | |
<?php the_content(); ?> | |
<?php wp_link_pages(); ?> | |
</div> | |
<?php if(class_exists('Woocommerce')): ?> | |
<?php if($data['comments_pages'] && !is_cart() && !is_checkout() && !is_account_page() && !is_page(get_option('woocommerce_thanks_page_id'))): ?> | |
<?php wp_reset_query(); ?> | |
<?php comments_template(); ?> | |
<?php endif; ?> | |
<?php else: ?> | |
<?php if($data['comments_pages']): ?> | |
<?php wp_reset_query(); ?> | |
<?php comments_template(); ?> | |
<?php endif; ?> | |
<?php endif; ?> | |
</div> | |
<?php endif; ?> | |
</div> | |
<div id="sidebar" style="<?php echo $sidebar_css; ?>"><?php generated_dynamic_sidebar(); ?></div> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment