ShapeShifter 2滚动主页“页面模板”片段
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ShapeShifter 2滚动主页“页面模板”片段相关的知识,希望对你有一定的参考价值。
Adding a file named "template-homepage.php" and adding this code inside it should essentially create a page template named "Scrolling Homepage" to your theme, which is useful in some customized landing page situations where you want another page as the landing page and still be able to use the theme's custom scrolling template.
<?php /* * Template Name: Scrolling Homepage */ get_header(); ?> <!-- Welcome Section --> <?php if(get_option_tree('include_welcome_section') == 'Yes' ) { ?> <?php get_template_part( 'element', 'welcomesection' ); ?> <?php } else {} ?> <!-- /Welcome Section --> <?php if(get_option_tree('sidescroll_page_ids')) { //New checkpoint for 1.02 // set an array of page id's $ids = get_option_tree( 'sidescroll_page_ids', $theme_options, false, true, -1 ); } } if(get_option_tree('sidescroll_page_ids')) { //New checkpoint for 1.02 'include' => $id_string, 'sort_column' => 'post_date', 'sort_order' => 'desc' ) ); foreach ($pages as $pagg) { setup_postdata($pagg); ?> <div class="content_block slide_block"> <br class="clearfix" /> <a id="<?php echo($pagg->post_name)?>" name="<?php echo($pagg->post_name)?>" class="waypoint_marker"></a> <?php if(get_post_meta($pagg->ID,'page_caption')) : ?> <div id="page-header"> <span class="supertagline" style="margin: 8px 0 20px;"><?php echo get_post_meta($pagg->ID,'page_caption',true); ?> </span> <br class="clear" /> <hr class="partial-bottom" /> </div> <?php endif; ?> <?php if(get_post_meta($pagg->ID,'hide_title',true) == 'Yes') : else : ?> <h2 class="title"><span><?php echo($pagg->post_title)?></span></h2> <?php endif; ?> <div class="content_body"> <?php the_content(); ?> </div> <br class="clearfix"/> <hr class="partial-bottom" /> </div> <?php } } ?> <?php get_footer(); ?>
以上是关于ShapeShifter 2滚动主页“页面模板”片段的主要内容,如果未能解决你的问题,请参考以下文章