public static function tpl_include($template) { //checks to see if mobile theme is available $mobile_themes = false; if (file_exists(get_stylesheet_directory() . '/mobile.php') or file_exists(get_stylesheet_directory() . '/tbs-mobile.php')) { $mobile_themes = true; } if (cwp::theme_settings('offline') == 1 and !current_user_can('manage_options')) { self::$main_tpl = get_stylesheet_directory() . '/offline.php'; } else { self::$main_tpl = $template; } self::$base_tpl = substr(basename(self::$main_tpl), 0, -4); if ('index' == self::$base_tpl) { self::$base_tpl = false; } /** * check to seee if a mobile templaate exists in stylesheet dir and load * to disable mobile themes create a child theme without a mobile template */ if ($mobile_themes and mod_mobile::detect()->isPhone()) { /* * theme/tpl/layout/file.php - theme/tpl/index.php */ $templates = array('tpl/mobile/tbs-mobile.php', 'tpl/mobile/mobile.php'); if (self::$base_tpl) { //twitter bootstrap themes array_unshift($templates, sprintf('tpl/mobile/tpl-tbs-mobile-%s.php', self::$base_tpl)); //foundation themes - may remove foundation entirely array_unshift($templates, sprintf('tpl/mobile/tpl-mobile-%s.php', self::$base_tpl)); } } else { /* * theme/tpl/layout/file.php - theme/tpl/index.php */ $templates = array('tpl/layout/tbs-index.php', 'tpl/themes/index.php', 'tpl/layout/tpl-index.php', 'tpl/layout/index.php'); if (self::$base_tpl) { //foundation themes - may remove foundation entirely //array_unshift($templates, sprintf('tpl/sample/tpl-%s.php', self::$base_tpl)); array_unshift($templates, sprintf('tpl/layout/tpl-%s.php', self::$base_tpl)); array_unshift($templates, sprintf('tpl/themes/tpl-%s.php', self::$base_tpl)); //array_unshift($templates, sprintf('tpl/custom/tpl-%s.php', self::$base_tpl)); //twitter bootstrap themes //array_unshift($templates, sprintf('tpl/sample/tpl-tbs-%s.php', self::$base_tpl)); array_unshift($templates, sprintf('tpl/layout/tpl-tbs-%s.php', self::$base_tpl)); array_unshift($templates, sprintf('tpl/themes/tpl-tbs-%s.php', self::$base_tpl)); // array_unshift($templates, sprintf('tpl/custom/tpl-tbs-%s.php', self::$base_tpl)); } } return locate_template($templates); //self::locate_tpl($template_names, $slug, $load, $require_once) // return self::locate_tpl($templates); }
/** * * @param string $query post query * @param string $tpl template file * @param array $data additional post data */ public static function tpl($query = 'showposts=5', $tpl = 'index', $data = array('thumbnail' => 'slider-image', 'id' => 'cycle')) { //echo "<div class='slider'>"; //core_mods::modules('index', 'cycle'); //echo "</div>"; if (is_array($data)) { extract($data); } ?> <div class="cycle-slider"> <div id="<?php echo isset($id) ? $id : 'cycle'; ?> "> <?php $q_cycle = new WP_Query('showposts=5'); ?> <?php if ($q_cycle->have_posts()) { ?> <?php while ($q_cycle->have_posts()) { $q_cycle->the_post(); ?> <?php //core_module::tpl("index", 'cycle',$data) ?> <?php cwp_layout::tpl_part('cycle', 'index'); ?> <?php } ?> <?php } ?> </div> </div> <div class="cycle-nav"><a id="prev" href="#">Prev</a> <a id="next" href="#">Next</a></div> <?php }
echo apply_filters('archive_meta', '<div class="archive-meta">' . $categorydesc . '</div>'); } ?> </header> <?php /* Display navigation to next/previous pages when applicable */ ?> <?php /* Start the Loop */ while (have_posts()) { the_post(); ?> <?php //get_template_part( 'content', get_post_format() ); ?> <?php cwp_layout::tpl_part('base', get_post_format() ? get_post_format() : 'general'); ?> <?php } ?> <?php /* Display navigation to next/previous pages when applicable */ cwp_layout::tpl_part('base', 'post-nav');
<div class="container"> <div class="row"> <?php cwp_layout::main_tpl(); ?> </div> </div> </section> <section id="login"> <div class="container"> <div class="row"> <div class="eight columns"> Dynamically coordinate technically sound supply chains via B2B materials. Authoritatively recaptiualize robust action items vis-a-vis an expanded array of testing procedures. Monotonectally orchestrate business users for client-centered infomediaries. Dramatically. <!-- ####column-end#### --> </div> <div class="four login"> <button class="nice small button white radius">Register</button> <button class=" nice small button white radius">Login</button> <!-- ###end-row### --> </div> </div> <!-- container --> </div> </section> <?php cwp_layout::theme_footer(); cwp_layout::footer();
<?php /* Start the Loop */ while (have_posts()) { the_post(); ?> <?php //get_template_part('content', get_post_format()); ?> <?php //cwp::get_tpl_content((get_post_format() ? get_post_format() : 'general')); ?> <li> <?php cwp_layout::tpl_part('base', 'themes'); ?> </li> <?php } ?> </ul> <?php /* Display navigation to next/previous pages when applicable */ ?> <?php if ($wp_query->max_num_pages > 1) { ?> <nav id="nav-below"> <!-- <h1 class="section-heading"><?php
/** * * @param type $slug */ public static function header($slug = null) { $tpl = 'header'; if (isset($slug)) { $tpl = "{$slug}-header"; } cwp_layout::tpl_part(null, $tpl); }
</div> </section> <section id="subscribe"> <div class="container"> <div class="row"> <div class="span8 "> <div class="subscribe-text"> Subscribe and get the latest updates, news, specials and more... <!-- class content --> <!-- ###### --> </div> <!-- ####column-end#### --> </div> <div class="span4 subscribe-btn"> <button class="ui btns orange"><?php _e('Subscribe Now', 'basejump'); ?> </button> <!-- ###end-row### --> </div> </div> <!-- container --> </div> </section> <?php cwp_layout::the_footer('tbs'); get_footer('tbs');
<?php //masonry::tpl('post_type=page&showposts=4&order=ASC&orderby=menu_order'); ?> <?php $m_q = new WP_Query('post_type=page&showposts=4&order=ASC&orderby=menu_order'); if ($m_q->have_posts()) { while ($m_q->have_posts()) { $m_q->the_post(); ?> <div class="three columns"> <div <?php post_class(); ?> > <!-- container --> <?php $masonry_tpl = get_post_format() ? get_post_format() : 'grid'; ?> <?php cwp_layout::tpl_part('masonry', "masonry-{$masonry_tpl}"); ?> <div class="clear">Cleared</div> </div> </div> <?php } } ?> </div> </div>
<?php /** * @package WordPress * @subpackage Core-WP * @author shawnsandy */ cwp_layout::use_tpl('home-page');
} get_header(); cwp_layout::theme_header(); //cwp::get_theme_header(); ?> <section id="content"> <div class="container"><!-- container --> <div class="row"><!-- container --> <div class="eight columns"><!-- container --> <section id="articles"> <?php cwp::get_tpl(); ?> </section> </div> <div class="four columns"><!-- container --> <section id="sidebar"> <?php get_sidebar(); ?> </section><!-- #sidebar --> </div> <div class="clear">Cleared</div> </div> </div> <div class="clear">Cleared</div> </section> <?php cwp_layout::theme_footer(); //cwp::get_theme_footer(); get_footer();
<?php core_functions::setPostViews(); ?> <section id="post-content"> <?php //get_template_part('content', 'single'); ?> <?php $bj_single_prefix = get_post_format() ? get_post_format() . '-' : ''; ?> <?php cwp_layout::tpl_part('base', $bj_single_prefix . 'single'); ?> </section> <section id="author-info"> <div class="row-fluid"> <div class="span1"> <div class="authoravatar"> <?php if (function_exists('get_avatar')) { echo get_avatar(get_the_author_meta('email'), 60); } ?> </div> <!-- ###end-row### --> </div>
<?php /** * @package WordPress * @subpackage Core-WP * @author shawnsandy */ cwp_layout::use_tpl('full-page');
<?php /** * @package WordPress * @subpackage CORE-SF */ get_header('tbs'); cwp_layout::the_header('tbs'); ?> <section id="articles" class="container"> <div class="row"><!-- container --> <?php //if(mod_mobile::detect()->isMobile()) echo 'Mobile Dectected'; ?> <div class="span12 "><!-- container --> <div id="offline"> <?php cwp_layout::main_tpl(); ?> <!-- class content --> </div> <!-- ###### --> </div> </div> </section> <?php cwp_layout::the_footer('offline'); get_footer('tbs');
<?php /** * @package WordPress * @subpackage Core-WP * @author shawnsandy */ cwp_layout::main_tpl(); ?>
?> <section id="content"> <div class="container"><!-- container --> <div class="row"><!-- container --> <div class="twelve columns"><!-- container --> <section id="articles"> <?php cwp_layout::main_tpl(); ?> </section> </div> <div class="row"> <div class="twleve columns"> <section id="widgets-404"> <?php dynamic_sidebar('404-page'); ?> </section> <!-- ###end-row### --> </div> </div> <div class="clear">Cleared</div> </div> </div> <div class="clear">Cleared</div> </section> <?php cwp_layout::the_footer('tbs'); cwp_layout::footer('tbs');
the_post(); ?> <?php core_functions::setPostViews(); ?> <section id="post-content"> <?php //get_template_part('content', 'single'); ?> <?php //cwp::get_tpl_content('single'); ?> <?php cwp_layout::tpl_part('base', 'single'); ?> </section> <section id="author-info"> <div class="row"> <div class="two columns"> <div class="authoravatar"> <?php if (function_exists('get_avatar')) { echo get_avatar(get_the_author_meta('email'), 60); } ?> </div> <!-- ###end-row### --> </div>
?> <!-- ###### --> <div class="row"> <div class="span8"> <?php //cwp::get_tpl_content('page'); ?> <?php while (have_posts()) { the_post(); ?> <?php cwp_layout::tpl_part('base', 'page'); ?> <?php //get_template_part('content', 'page'); ?> <?php //comments_template('', true); ?> <?php } // end of the loop. ?> <!-- class content --> </div>
?> <?php /* Start the Loop */ ?> <?php while (have_posts()) { the_post(); ?> <?php //cwp::get_tpl_content('search'); ?> <?php cwp_layout::tpl_part('base', 'search'); ?> <?php } ?> <?php /* Display navigation to next/previous pages when applicable */ ?> <?php if ($wp_query->max_num_pages > 1) { ?> <nav id="nav-below"> <h1 class="section-heading"><?php
<?php } ?> <?php /* Start the Loop */ while (have_posts()) { the_post(); ?> <?php ?> <?php// cwp::get_tpl_content((get_post_format() ? get_post_format() : 'general')); ?> <?php cwp_layout::tpl_part(get_post_format() ? get_post_format() : 'general'); ?> <?php } ?> <?php /* Display navigation to next/previous pages when applicable */ if ($wp_query->max_num_pages > 1) { ?> <nav id="nav-below"> <h1 class="section-heading"><?php _e('Post navigation', 'basejump'); ?> </h1>
/** * * Uses WP_Query to create post loops * @param string / array $query * @param string $tpl_slug // default - base * @param string $tpl_name // default - general * @param string $def_tpl * <code></code> */ public static function query($query = 'showposts=5', $tpl_slug = null, $tpl_name = null, $def_tpl = 'no_post') { global $post; $wp = new WP_Query(); $wp->query($query); if ($wp->have_posts()) { while ($wp->have_posts()) { $wp->the_post(); $post_type = get_post_type(); $post_format = get_post_format() ? get_post_format() : 'general'; if ($tpl_slug == 'post_type') { $tpl_slug = $post_type; } if ($tpl_slug == 'format') { $tpl_slug = $post_format; } $slug = isset($tpl_slug) ? $tpl_slug : 'base'; $name = isset($tpl_name) ? $tpl_name : 'general'; cwp_layout::tpl_part($slug, $name); } } else { cwp_layout::tpl_part(null, $def_tpl); } wp_reset_postdata(); }