Created
June 2, 2015 10:11
-
-
Save iwillhappy1314/910c74ab4b9e7a389056 to your computer and use it in GitHub Desktop.
Wizhi CMS Demo code
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 | |
/** | |
* The main template file. | |
* | |
* This is the most generic template file in a WordPress theme | |
* and one of the two required files for a theme (the other being style.css). | |
* It is used to display a page when nothing more specific matches a query. | |
* E.g., it puts together the home page when no home.php file exists. | |
* Learn more: http://codex.wordpress.org/Template_Hierarchy | |
* | |
* @package cars | |
*/ | |
get_header(); ?> | |
<div id="primary" class="content-area"> | |
<main id="main" role="main"> | |
<div class="pure-u-1 banner"> | |
<?php echo do_shortcode('[rs_slider type="post" tax="category" tag="banner" speed="1000" num="2" thumbs="full" cut=""]'); ?> | |
</div> | |
<div class="pure-g-r"> | |
<div class="pure-u-2-3"> | |
<table class="pure-table pure-table-bordered"> | |
<thead> | |
<tr> | |
<th width="30%">培训课程</th> | |
<th width="30%">开班时间</th> | |
<th width="20%">属性</th> | |
<th width="20%">开始报名</th> | |
</tr> | |
</thead> | |
<?php | |
$args = array( | |
'post_type' => 'cast', | |
'posts_per_page' => '6', | |
'castcat' => 'homecast' | |
); | |
$the_query = new WP_Query( $args ); | |
?> | |
<?php if ( $the_query->have_posts() ) { ?> | |
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?> | |
<tr> | |
<td><?php echo wp_trim_words( get_the_title(), 14, "" ); ?></td> | |
<td><?php echo get_post_meta( get_the_ID(), 'time_start', true ) ?></td> | |
<td><?php echo get_post_meta( get_the_ID(), 'class_cat', true ) ?></td> | |
<td><a href="/baoming/">点击进入</a></td> | |
</tr> | |
<?php endwhile; wp_reset_postdata();?> | |
<?php } ?> | |
</table> | |
</div> | |
<div class="pure-u-1-3"> | |
<?php echo do_shortcode('[title_list type="home" tax="homecat" tag="notice" num="6" cut="36" heading="1" time="true"]'); ?> | |
</div> | |
</div> | |
<div class="space"></div> | |
<div class="pure-g-r box-wraper box-mingshi"> | |
<div class="pure-u-1-4"> | |
<div class="zui-box mingshi"> | |
<div class="zui-box-head"> | |
<h3 class="zui-box-head-title"><a href="/teacher/">名师专家</a></h3> | |
<a class="more pull-right" href="/teacher/" target="_blank">更多></a> | |
</div> | |
<div class="zui-box-container"> | |
<?php echo do_shortcode('[photo_list type="post" tax="category" tag="hometeach" num="8" cut="" heading="0" thumbs="sml" cut="6" class="pure-u-1-2" position="top"]'); ?> | |
</div> | |
</div> | |
</div> | |
<div class="pure-u-3-4"> | |
<div class="pure-g-r"> | |
<div class="pure-u-1-2"> | |
<?php echo do_shortcode('[title_list type="home" tax="homecat" tag="biaozhun" num="6" cut="26" heading="1" time="true"]'); ?> | |
</div> | |
<div class="pure-u-1-2"> | |
<?php echo do_shortcode('[title_list type="home" tax="homecat" tag="peixun" num="6" cut="26" heading="1" time="true"]'); ?> | |
</div> | |
<div class="pure-u-1-2"> | |
<?php echo do_shortcode('[title_list type="home" tax="homecat" tag="kaoshi" num="6" cut="26" heading="1" time="true"]'); ?> | |
</div> | |
<div class="pure-u-1-2"> | |
<?php echo do_shortcode('[title_list type="home" tax="homecat" tag="anli" num="6" cut="26" heading="1" time="true"]'); ?> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="space"></div> | |
<div class="pure-g-r"> | |
<div class="pure-u-1"> | |
<?php echo do_shortcode('[thumb_scroll type="home" tax="homecat" tag="images" num="12" thumbs="wangqi" auto="1600" speed="1000" cut="46", arrow="1"]'); ?> | |
</div> | |
</div> | |
<div class="pure-g hadv" style="margin-bottom:0"> | |
<div class="pure-u"><a href="/adv1/"><img src="<?php bloginfo('template_url'); ?>/dist/images/adv1.png" alt="logo"></a></div> | |
<div class="pure-u"><a href="/adv2/"><img src="<?php bloginfo('template_url'); ?>/dist/images/adv2.png" alt="logo"></a></div> | |
<div class="pure-u"><a href="/adv3/"><img src="<?php bloginfo('template_url'); ?>/dist/images/adv3.png" alt="logo"></a></div> | |
<div class="pure-u"><a href="/adv4/"><img src="<?php bloginfo('template_url'); ?>/dist/images/adv4.png" alt="logo"></a></div> | |
</div> | |
<div class="pure-g-r box-wraper"> | |
<div class="pure-u-1-4"> | |
<div class="zui-box usercenter"> | |
<div class="zui-box-head"> | |
<h3 class="zui-box-head-title"><a href="/corp/">会员中心</a></h3> | |
</div> | |
<div class="zui-box-container"> | |
<?php the_widget('Wizhi_Login'); ?> | |
<?php the_widget('wizhi_submenus2'); ?> | |
</div> | |
</div> | |
</div> | |
<div class="pure-u-3-4"> | |
<?php echo do_shortcode('[photo_list type="home" tax="homecat" tag="huigu" num="8" cut="" heading="1" thumbs="wangqi" cut="10" class="pure-u-1-4" position="top"]'); ?> | |
</div> | |
</div> | |
<div class="space"></div> | |
<div class="space"></div> | |
<div class="pure-g-r box-wraper box-hezuo"> | |
<div class="pure-u-1-4"> | |
<div class="zui-box zhanlue"> | |
<div class="zui-box-head"> | |
<h3 class="zui-box-head-title"><a href="/corp/">战略合作单位</a></h3> | |
<a class="more pull-right" href="/corp/" target="_blank">更多></a> | |
</div> | |
<div class="zui-box-container"> | |
<?php echo do_shortcode('[title_list type="post" tax="category" tag="homecorp" num="25" cut="15" heading="0" time="0"]'); ?> | |
</div> | |
</div> | |
</div> | |
<div class="pure-u-3-4"> | |
<div class="pure-g-r"> | |
<div class="pure-u-1-2"> | |
<?php echo do_shortcode('[title_list type="home" tax="homecat" tag="dinggang" num="6" cut="26" heading="1" time="true"]'); ?> | |
</div> | |
<div class="pure-u-1-2"> | |
<?php echo do_shortcode('[title_list type="home" tax="homecat" tag="jiuye" num="6" cut="26" heading="1" time="true"]'); ?> | |
</div> | |
<div class="pure-u-1-2"> | |
<?php echo do_shortcode('[title_list type="home" tax="homecat" tag="xiaoqi" num="6" cut="26" heading="1" time="true"]'); ?> | |
</div> | |
<div class="pure-u-1-2"> | |
<?php echo do_shortcode('[title_list type="home" tax="homecat" tag="zixun" num="6" cut="26" heading="1" time="true"]'); ?> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="space"></div> | |
</main><!-- #main --> | |
</div><!-- #primary --> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment