Exemple #1
0
<?php

// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}
?>
<!-- tpl- Sidebar -->
<div class="sidebar-wrapper">
<aside id="sidebar" role="complementary" class="sidebar"  tabindex="0">
	<?php 
bb_display_widget(bb_get_sidebar_widget());
?>
</aside>
</div>
Exemple #2
0
function bb_sidebar($position, $returnWidget = false, $sidebar_wrapper = false)
{
    //global $myVariable;
    //prar($myVariable, false);
    //check position first
    $display = false;
    $pages_widget_right = get_theme_mod('pages_widget_right');
    //prar ( array ('pages_widget_right', $pages_widget_right ) );
    $posts_widget_right = get_theme_mod('posts_widget_right');
    //prar ( array ('posts_widget_right', $pages_widget_right ) );
    //if home page
    if (is_front_page() && get_theme_mod('home_sidebar')) {
        if ($pages_widget_right && $position == 'right') {
            //prar('home left sidebar', false);
            $display = true;
        } elseif (!$pages_widget_right && $position == 'left') {
            //prar('home right sidebar', false);
            $display = true;
        }
        //if blog
        //} elseif ( is_home() ){
        //if is_page
    } elseif (is_page() && !is_front_page()) {
        //prar(get_theme_mod('pages_widget'));
        if (!get_theme_mod('pages_widget')) {
        } elseif ($pages_widget_right && $position == 'right') {
            //prar('pages sidebar right', false);
            $display = true;
        } elseif (!$pages_widget_right && $position == 'left') {
            //prar('left sidebar pages', false);
            $display = true;
        }
        //if is_post
        //if custom post type use is_singular( 'custom-post-type' )
        //else
    } elseif (!is_front_page() && get_theme_mod('posts_widget')) {
        if ($posts_widget_right && $position == 'right') {
            //prar('left sidebar posts', false);
            $display = true;
        } elseif (!$posts_widget_right && $position == 'left') {
            //prar('right sidebar posts', false);
            $display = true;
        }
    }
    if ($display) {
        $sidebarWidget = bb_get_sidebar_widget();
        if ($returnWidget) {
            return $sidebarWidget;
        } else {
            if ($sidebar_wrapper) {
                echo '<aside id="sidebar" role="complementary" class="sidebar">';
            }
            bb_display_widget($sidebarWidget);
            if ($sidebar_wrapper) {
                echo '</aside>';
            }
        }
    }
}
<!-- tpl-main-wrapper-single --><div id="blk-content" class="block--content">
	<div class="content-wrapper">
		<div class="content-inner">
			<div class="block--main-content">
	<?php 
//Check if sidebar should be displayed on the left/before content
if (bb_sidebar('left', true)) {
    get_template_part('sidebar');
}
?>
			<div class="main-content-wrapper main-content-wrapper--<?php 
echo get_post_type();
?>
"><div id="main" tabindex="0"></div>
			<main role="main" class="main-content main-content--<?php 
echo get_post_type();
?>
">	
				<?php 
bb_yoast_breadcrumb();
?>
				<?php 
bb_display_widget('posts-widget-top');
?>
				<?php 
if (isset($post)) {
    bb_display_widget(get_post_meta($post->ID, 'widget-top', true));
}
<?php

// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}
/* 
 * You have the ability to exclude the header-widget on a per post/page basis. 
 * Just add a custom field with the name 'no-header-widget' with a value of 'true'
 */
if (isset($post)) {
    $exclude = get_post_meta($post->ID, 'no-header-widget');
}
if (isset($exclude) && is_array($exclude) && isset($exclude[0]) && $exclude[0] == 'true') {
    $no_show == true;
}
if (!isset($no_show)) {
    ?>
<!-- tpl- Header Widget -->
<div class="header-widget-wrapper">
	<div class="header-widget-inner inner"><?php 
    bb_display_widget('header-widget');
    ?>
</div>
</div>	
<?php 
}
?>
<!-- end Header Widget -->
Exemple #5
0
<?php

// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}
?>
	<div id="blk-footer" class="block--footer">
	  <div class="footer-widgets-wrapper">
	   <div class="footer-widgets-inner inner">		
			<?php 
bb_display_widget('footer-widget', array('wrapper' => true));
?>
			<?php 
bb_display_widget('footer-widget-2', array('wrapper' => true));
?>
	   </div>
	  </div>
	  	<?php 
if (get_theme_mod('footer_copyright')) {
    ?>
		  <div class="footer-wrapper">
			<footer role="contentinfo" class="footer">
				<div id="copyright-text" class="copyright source-org copyright-text">
				<?php 
    $start = get_theme_mod('copyright_start');
    if ($start) {
        echo '<p>&copy;' . bb_copyright_year(get_theme_mod('copyright_start')) . ' ' . get_theme_mod('copyright_text') . '</p>';
    } else {
        echo get_theme_mod('copyright_text');
    }
<?php

if (isset($post)) {
    bb_display_widget(get_post_meta($post->ID, 'widget-bottom', true), array('wrapper' => true));
}
?>
			</main>
		</div>
	</div><!-- end home -->
<?php 
if (is_active_sidebar('home-widget-bottom')) {
    ?>
	<div class="home-widget-bottom-wrapper">	
		<div class="home-widget-bottom-inner inner">
	<?php 
    bb_display_widget('home-widget-bottom');
    ?>
		</div>
	</div>
<?php 
}
?>
</div><!-- end block--content -->
				<?php 
if (isset($post)) {
    bb_display_widget(get_post_meta($post->ID, 'widget-bottom', true));
}
?>
				<?php 
bb_display_widget('page-widget-bottom');
?>
</main><!-- end MAIN CONTENT -->
			</div>
		
	<?php 
//Check if sidebar should be displayed on the right/after content
if (bb_sidebar('right', true)) {
    get_template_part('sidebar');
}
?>
			</div><!-- end .block--main-content -->
		</div><!-- end .content-inner -->
	</div><!-- end .content-wrapper -->
</div>
Exemple #8
0
if ($post) {
    bb_display_widget(get_post_meta($post->ID, 'widget-top', true));
}
?>
					<?php 
if (is_404()) {
    get_template_part('tpl', 'error');
} else {
    get_template_part('tpl', 'content');
}
?>
					<?php 
?>
					<?php 
if ($post) {
    bb_display_widget(get_post_meta($post->ID, 'widget-bottom', true));
}
?>
			</main><!-- end MAIN CONTENT -->
				</div>
			</div>
		
	<?php 
//Check if sidebar should be displayed on the right/after content
if (bb_sidebar('right', true)) {
    get_template_part('sidebar');
}
?>
		</div><!-- end .block--main-content -->
		</div><!-- end .content-inner -->
	</div><!-- end .content-wrapper -->
Exemple #9
0
<?php

// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}
?>
<!-- tpl- Error -->
	<article id="post-error" class="error">
		<header class="entry-header post-header">
					<h1 class="entry-title"><?php 
_e('Don&rsquo;t worry. We&rsquo;ll get through this.', 'bear-bones');
?>
</h1>
				</header>

				<div class="entry-content post-content">
					<p><?php 
_e('It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'bear-bones');
?>
</p>
					<?php 
get_search_form();
?>
				</div><!-- .entry-content -->
				<?php 
bb_display_widget('error');
?>
	</article><!-- end Content -->
<!-- end .tpl-content -->
Exemple #10
0
?>
					<?php 
bb_display_widget(get_post_meta(get_option('page_for_posts'), 'widget-top', true));
?>
					<?php 
$blogTitle = get_theme_mod('blog__title');
if ($blogTitle) {
    echo "<h1>{$blogTitle}</h1>";
}
?>
					<?php 
//check for template else default
get_template_part('tpl', 'content-list');
?>
					<?php 
bb_display_widget(get_post_meta(get_option('page_for_posts'), 'widget-bottom', true));
?>
			</main><!-- end MAIN CONTENT -->
			</div>
		  </div>
		
	<?php 
//Check if sidebar should be displayed on the right/after content
if (bb_sidebar('right', true)) {
    get_template_part('sidebar');
}
?>
		</div><!-- end .block--main-content -->
		</div><!-- end .content-inner -->
	</div><!-- end .content-wrapper -->
</div>
				<?php 
if (isset($post)) {
    bb_display_widget(get_post_meta($post->ID, 'widget-bottom', true));
}
?>
				<?php 
bb_display_widget('posts-widget-bottom');
?>
</main><!-- end MAIN CONTENT -->
			</div>
		
	<?php 
//Check if sidebar should be displayed on the right/after content
if (bb_sidebar('right', true)) {
    get_template_part('sidebar');
}
?>
			</div><!-- end .block--main-content -->
		</div><!-- end .content-inner -->
	</div><!-- end .content-wrapper -->
</div>