Esempio n. 1
0
/**
 * Get layout base on current page
 *
 * @return string
 */
function bigboom_get_layout()
{
    $layout = bigboom_theme_option('default_layout');
    if (is_singular() && bigboom_get_meta('custom_layout')) {
        $layout = bigboom_get_meta('layout');
    } elseif (is_page()) {
        $layout = bigboom_theme_option('page_layout');
    } elseif (function_exists('is_woocommerce') && is_woocommerce()) {
        $layout = bigboom_theme_option('shop_layout');
    } elseif (is_404()) {
        $layout = 'full-content';
    }
    return $layout;
}
Esempio n. 2
0
/**
 * Adds custom classes to the array of body classes.
 *
 * @since 1.0
 * @param array $classes Classes for the body element.
 * @return array
 */
function bigboom_body_classes($classes)
{
    // Adds a class of group-blog to blogs with more than 1 published author.
    if (is_multi_author()) {
        $classes[] = 'group-blog';
    }
    // Add a class of layout
    $classes[] = bigboom_get_layout();
    // Add a class of shop
    if (isset($_COOKIE['shop_view']) && function_exists('is_shop') && (is_shop() || is_product_category() || is_product_tag())) {
        $classes[] = 'shop-view-' . $_COOKIE['shop_view'];
    }
    // Add a class for color scheme
    if (intval(bigboom_theme_option('custom_color_scheme')) && bigboom_theme_option('custom_color_1')) {
        $classes[] = 'custom-color-scheme';
    } else {
        $classes[] = bigboom_theme_option('color_scheme');
    }
    return $classes;
}
Esempio n. 3
0
    /**
     * Display Addthis sharing
     *
     * @since 1.0
     */
    function share()
    {
        if ($addthis_id = bigboom_theme_option('addthis_profile_id')) {
            printf('<div class="addthis_native_toolbox addthis_toolbox addthis_default_style addthis_32x32_style">
					<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
					<a class="addthis_button_tweet"></a>
					<a class="addthis_button_google_plusone"></a>
					<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=%s"></script>
				</div>', esc_attr($addthis_id));
        }
    }
Esempio n. 4
0
?>
">
		<main id="main" class="site-main" role="main">
		
			<?php 
while (have_posts()) {
    the_post();
    ?>

				<?php 
    get_template_part('parts/content', 'page');
    ?>

				<?php 
    // If comments are open or we have at least one comment, load up the comment template
    if (intval(bigboom_theme_option('show_page_comment')) && (comments_open() || '0' != get_comments_number())) {
        comments_template();
    }
    ?>

			<?php 
}
// end of the loop.
?>

		</main><!-- #main -->
	</div><!-- #primary -->

<?php 
get_sidebar();
get_footer();
Esempio n. 5
0
			<?php 
$mobile_menu_class = has_nav_menu('mobile') ? '' : 'mobile-menu';
wp_nav_menu(array('theme_location' => 'primary', 'container_id' => 'primary-menu', 'container_class' => "primary-menu {$mobile_menu_class} container", 'menu_class' => 'menu clearfix'));
if (has_nav_menu('mobile')) {
    wp_nav_menu(array('theme_location' => 'mobile', 'container_id' => 'mobile-menu', 'container_class' => 'primary-menu mobile-menu container', 'menu_class' => 'menu clearfix'));
}
?>
		</nav><!-- #site-navigation -->
	</header><!-- #masthead -->

	<header id="masthead" class="site-header site-header-fixed" role="banner">
		<div class="container">
			<div class="row">
				<div class="site-branding col-xs-12 col-sm-2 col-md-2">
					<?php 
$logo = bigboom_theme_option('logo');
$logo = $logo ? $logo : THEME_URL . '/img/logo.png';
?>
					<center>
						<a href="<?php 
echo esc_url(home_url('/'));
?>
" class="logo">
							<img alt="<?php 
echo esc_attr(get_bloginfo('name'));
?>
" src="<?php 
echo esc_url($logo2);
?>
" />
						</a>
Esempio n. 6
0
	<?php 
do_action('bigboom_before_footer');
?>

	<footer id="colophon" class="site-footer" role="contentinfo">
		<?php 
do_action('bigboom_footer');
?>
	</footer><!-- #colophon -->

	<?php 
do_action('bigboom_after_footer');
?>
</div><!-- #page -->
<div id="modal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true" data-id="<?php 
echo esc_attr(bigboom_theme_option('addthis_profile_id'));
?>
">
	<div class="item-detail">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"><i class="fa fa-times"></i><span class="sr-only"><?php 
_e('Close', 'bigboom');
?>
</span></button>
				</div>
				<div class="woocommerce">
					<div class="modal-body product"></div>
				</div>
			</div>
Esempio n. 7
0
/**
 * Change the excerpt length
 *
 * @since  1.0.0
 *
 * @param  int $length
 * @return int
 */
function bigboom_excerpt_length($length)
{
    $custom = intval(bigboom_theme_option('excerpt_length'));
    if ($custom) {
        $length = $custom;
    }
    return $length;
}
Esempio n. 8
0
/**
 * Add custom scripts to site footer
 *
 * @since 1.0
 */
function bigboom_footer_custom_scripts()
{
    if ($script = bigboom_theme_option('footer_script')) {
        echo $script;
    }
}
Esempio n. 9
0
/**
 * Display topbar before site header
 *
 * @since 1.0
 */
function bigboom_topbar()
{
    if (!intval(bigboom_theme_option('topbar'))) {
        return;
    }
    ?>
	<div id="topbar" class="topbar">
		<div class="container">
			<div class="row">
				<div class="topbar-left topbar-sidebar col-xs-12 col-sm-12 col-md-4">
					<?php 
    dynamic_sidebar('topbar-left');
    ?>
				</div>

				<div class="topbar-right topbar-sidebar col-xs-12 col-sm-12 col-md-8">
					<?php 
    dynamic_sidebar('topbar-right');
    ?>
				</div>
			</div>
		</div>
	</div>
	<?php 
}