the_title(); ?> </a> </h2> </header> <div class="visible-print print-separator"></div> <div class="blog-post-excerpt" itemprop="description"> <?php the_excerpt(); ?> </div> <?php if (get_post_type() != 'page') { ?> <div class="visible-print print-separator"></div> <footer class="blog-post-footer"> <?php get_template_part_hierarchical('partials/meta/summary-footer', get_post_format()); ?> </footer> <?php } ?> </div> </article> <hr class="visible-print" />
<?php /* Template Name: Sidebar Left, 2 Columns */ $template = get_template_type(); $page_type = get_page_type(); get_header_hierarchical('page'); ?> <section id="content" role="main"> <?php get_the_breadcrumb(); ?> <?php get_template_part_hierarchical('partials/loop', 'left_sidebar'); ?> </section> <?php get_sidebar_hierarchical('page'); get_footer_hierarchical('page');
<div class="lead clearfix"> <?php the_excerpt(); ?> </div> <?php } ?> <?php the_content(); ?> <div class="blog-post-links"><?php get_the_link_pages(); ?> </div> </div> <div class="hidden-print"> <?php if (is_page() && get_basicbootstrap_mod('show_sharing_links_page') || !is_page() && get_basicbootstrap_mod('show_sharing_links_post')) { ?> <?php get_template_part_hierarchical('partials/social-share', get_post_format()); ?> <?php } ?> </div> </article>
* @package WP_Basic_Bootstrap * @since WP_Basic_Bootstrap 1.0 */ $template = get_template_type(); $page_type = get_page_type(); $singular_type = get_singular_type(); /*/ error_log('from file : '.__FILE__); error_log('page type : '.$page_type); error_log('singular type : '.$singular_type); error_log('applied template : '.$template); //*/ get_header_hierarchical('single'); ?> <div id="content" role="main"> <?php get_the_breadcrumb(); ?> <?php get_template_part_hierarchical('partials/loop'); //get_template_part_singular('partials/loop'); ?> </div> <?php get_sidebar_hierarchical('single'); get_footer_hierarchical('single');
<?php /** * @package WP_Basic_Bootstrap * @since WP_Basic_Bootstrap 1.0 */ if (is_singular() && !is_attachment()) { get_template_part_hierarchical('partials/socials/content', get_post_format()); } elseif (is_attachment()) { get_template_part_hierarchical('partials/socials/content', 'attachment'); }
<?php while (have_posts()) { the_post(); ?> <?php if ($count == 0 || $count % 2 == 0) { ?> <div class="row"> <?php } ?> <div class="col-md-6"> <?php get_template_part_hierarchical('post-templates/summary', get_post_format()); ?> </div> <?php if ($count % 2 != 0) { ?> </div> <?php } ?> <?php $count++; } ?>
<?php /* * Template Name: Full-width Page Template, No Sidebar */ $template = get_template_type(); $page_type = get_page_type(); get_header_hierarchical('page'); ?> <section id="content" role="main"> <?php get_the_breadcrumb(); ?> <?php get_template_part_hierarchical('partials/loop', 'full_width'); ?> </section> <?php get_footer_hierarchical('page');
<?php /** * @package WP_Basic_Bootstrap * @since WP_Basic_Bootstrap 1.0 */ // single page content if (is_singular() && have_posts()) { while (have_posts()) { the_post(); get_template_part_hierarchical('post-templates/content', get_post_format()); get_the_pagination(); if (!is_attachment()) { comments_template_hierarchical(); } } // objects list } elseif (have_posts()) { get_template_part_hierarchical('partials/layout/posts-list', get_posts_list_layout()); get_the_pagination(); // no list to show } else { _e('Sorry, no posts matched your criteria.', 'basicbootstrap'); }
the_excerpt(); } ?> </span> </a> <?php } ?> </div> <div class="entry-description"> <?php the_content(); ?> </div> </div> <div class="hidden-print"> <?php if (get_basicbootstrap_mod('show_sharing_links_attachment')) { ?> <?php get_template_part_hierarchical('partials/social-share', 'attachment'); ?> <?php } ?> </div> </article>
/** * Find the path of a template following the WP hierarchy * * @param $slug * @param null $name * @param bool $extension_only * @return mixed|string|void */ function template_part_hierarchical($slug, $name = null, $extension_only = false) { $template = get_template_part_hierarchical($slug, $name, false); if ($extension_only) { $template = str_replace(array("{$slug}-", '.php'), '', trim(get_theme_relative_path($template), '/')); if ($template == $slug) { $template = ''; } } return $template; }
?> <?php get_template_part_hierarchical('partials/layout/navbar'); } ?> <div class="container"> <?php get_template_part_hierarchical('partials/layout/header'); ?> <?php if ($navbar_type == 'default') { ?> <?php get_template_part_hierarchical('partials/layout/navbar'); ?> <?php } ?> <div class="row"> <?php if ($template == 'left_sidebar') { ?> <?php if (is_rtl()) { ?> <div class="col-xs-12 col-sm-9 blog-main-left" itemprop="mainContentOfPage"> <?php } else {
error_log('page type : '.$page_type); error_log('applied template : '.$template); //*/ if (strpos($template, 'full_width') !== false) { ?> </div><!-- /.blog-main --> <?php } ?> </div><!-- /.row --> </div><!-- /.container --> <footer id="footer" class="blog-footer hidden-print"> <?php get_template_part_hierarchical('partials/layout/footer'); ?> </footer> </div><!-- /#wrapper --> <?php wp_footer(); ?> <a href="#content" class="sr-only sr-only-focusable"><?php _e('Back to main content', 'basicbootstrap'); ?> </a> <a href="#navigation" class="sr-only sr-only-focusable"><?php _e('Back to main navigation', 'basicbootstrap');
?> </span> <span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span> </button> <?php if (get_theme_mod('show_navbar_brand', true)) { ?> <a class="navbar-brand" href="<?php echo esc_url(home_url('/')); ?> "><?php bloginfo('name'); ?> </a> <?php } ?> </div> <div id="navbar" class="navbar-collapse collapse"> <?php wp_nav_menu(array('menu' => 'primary', 'theme_location' => 'main-menu', 'depth' => 0, 'container' => null, 'menu_class' => 'nav navbar-nav', 'fallback_cb' => 'WP_Bootstrap_Navwalker::fallback', 'walker' => new WP_Bootstrap_Navwalker())); if (get_basicbootstrap_mod('display_social_icons')) { get_template_part_hierarchical('partials/socials/navbar-links'); } else { wp_nav_menu(array('menu' => 'social', 'theme_location' => 'social-menu', 'depth' => 1, 'container' => null, 'menu_class' => 'nav navbar-nav navbar-right', 'fallback_cb' => 'WP_Bootstrap_Navwalker::fallback', 'walker' => new WP_Bootstrap_Navwalker())); } ?> </div><!--/.nav-collapse --> </div> </nav>