Last active
June 12, 2018 05:22
-
-
Save Masamasamasashito/3141267b54ed2960dd5eb1e8c14de6e8 to your computer and use it in GitHub Desktop.
TCD Agent 033
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 | |
if(get_post_meta($post->ID,'page_main_image',true)) { | |
if(is_mobile()){ | |
if(get_post_meta($post->ID, 'page_main_image_mobile', true)){ | |
$value = get_post_meta($post->ID, 'page_main_image_mobile', true); | |
}else{ | |
$value = get_post_meta($post->ID, 'page_main_image', true); | |
} | |
$image = wp_get_attachment_image_src($value, 'full'); | |
}else{ | |
$value = get_post_meta($post->ID, 'page_main_image', true); | |
$image = wp_get_attachment_image_src($value, 'full'); | |
}; | |
}else{ | |
if(has_post_thumbnail()){ | |
$value = get_post_thumbnail_id($post->ID); | |
$image = wp_get_attachment_image_src($value, 'full'); | |
}else{ | |
$image = false; | |
}; | |
}; | |
?> | |
<?php if($image): ?> | |
<div class="container-fluid"> | |
<div class="row"> | |
<div class="col-xs-120 page-splash hidden-xs" data-parallax="scroll" data-image-src="<?php echo $image[0]; ?>"></div> | |
<div class="col-xs-120 visible-xs" style="padding:0; height:300px; background-image:url(<?php echo $image[0]; ?>); background-size:cover; background-repeat: no-repeat; background-position:center center;"></div> | |
</div> | |
</div><!--/container-fluid--> | |
<?php endif; ?> | |
<!--content-pagenoside.php--> | |
<div class="container"<?php if(!$image){ echo ' style="margin-top:215px;"'; }else{ echo ' style="margin-top:50px;"'; }; ?>> | |
<?php //get_template_part('breadcrumb'); ?> | |
<div class="row"> | |
<div class="col-sm-120"> | |
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> | |
<header> | |
<h2 class="page-title"><?php the_title(); ?></h2> | |
</header> | |
<?php if( has_post_thumbnail() or $post->content!=='' ){ ?> | |
<div class="entry-content"> | |
<?php if ( has_post_thumbnail()) { ?> | |
<div class="entry-content-thumbnail"> | |
<?php the_post_thumbnail(); ?> | |
</div> | |
<?php } ?> | |
<?php if($post->content!=='' ){ the_content(); } ?> | |
</div> | |
<?php } ?> | |
</article> | |
</div> | |
</div> | |
</div> | |
<?php | |
$page_tcd_template_type = get_post_meta($post->ID,'page_tcd_template_type',true); | |
if($page_tcd_template_type == 'type2') { get_template_part('page/template1'); custom_wp_link_pages(); get_footer(); } | |
elseif($page_tcd_template_type == 'type3') { get_template_part('page/template2'); custom_wp_link_pages(); get_footer(); } | |
elseif($page_tcd_template_type == 'type4') { get_template_part('page/template3'); custom_wp_link_pages(); get_footer(); } | |
elseif($page_tcd_template_type == 'type5') { get_template_part('page/template4'); custom_wp_link_pages(); } | |
else{ get_footer(); }; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment