File: /www/wwwroot/www.sceycy.com/wp-content/themes/Zing-Pro/single-dahuzi-page.php
<?php
/**
* @Author: 大胡子
* @Email: dahuzi@xintheme.com
* @Link: www.dahuzi.me
* @Date: 2020-10-17 22:19:20
* @Last Modified by: dahuzi
* @Last Modified time: 2021-06-20 00:41:07
*/
$dahuzi_page = get_post_meta( get_the_ID(), 'post_type_dahuzi_page', true );
$dahuzi_page_modular = isset($dahuzi_page['index_modular']) ? $dahuzi_page['index_modular'] : '';
$page_banner = isset($dahuzi_page['page_banner']) ? $dahuzi_page['page_banner'] : '';
$banner_img = isset($page_banner['banner_img']['url']) ? $page_banner['banner_img']['url'] : '';
get_header(); ?>
<?php if( $banner_img ){?>
<div class="module-default">
<div class="responsive-carousel carousel clearfix">
<div class="carousel-item">
<img src="<?php echo $banner_img; ?>" alt="<?php the_title(); ?>">
</div>
</div>
</div>
<?php }?>
<?php
//$index_modular = xintheme('index_modular');
if(is_array($dahuzi_page_modular)){
foreach($dahuzi_page_modular as $id):
$modular_type = $id['modular_type'];
get_template_part( 'template-parts/modular/'.$modular_type.'' );
endforeach;
}else{
echo "<div style='text-align:center;line-height:80vh;font-size:22px;font-weight:600'>抱歉,当前页面没有添加任何模块!</div>";
}
get_footer();