Exemple #1
0
 function wm_wc_products_columns($columns = 4)
 {
     // Helper variables
     $columns = 4;
     $wc_page_id = is_shop() ? wc_get_page_id('shop') : null;
     $atts = apply_filters('wmhook_wm_wc_wrapper_sidebar_atts', array('page_id' => $wc_page_id), $wc_page_id);
     $sidebar = (array) wm_sidebar_setup(false, $atts);
     // Processing
     if (isset($sidebar['output']) && trim($sidebar['output'])) {
         $columns = 3;
     }
     // Output
     return absint(apply_filters('wmhook_wm_wc_products_columns_output', $columns, $sidebar));
 }
Exemple #2
0
/**
 * General index template
 *
 * @package    WebMan WordPress Theme Framework
 * @copyright  2014 WebMan - Oliver Juhas
 *
 * @since    1.0
 * @version  1.2.7
 */
/**
 * Sidebar implementation
 *
 * Variables setup
 */
$page_id = is_archive() && get_option('page_for_posts') ? get_option('page_for_posts') : null;
$sidebar = wm_sidebar_setup(false, array('page_id' => $page_id));
if (!function_exists('wma_amplifier')) {
    $sidebar['class_main'] = ' eight pane';
}
/**
 * Actual output
 */
get_header();
?>

<div class="wrap-inner">

	<div class="content-area site-content<?php 
echo $sidebar['class_main'];
?>
">
 * Helper variables
 */
$content_area_class = '';
$sidebar_none_posts = apply_filters('wmhook_sidebar_none_posts', array('wm_projects', 'page'));
$sidebar_none_posts = is_singular($sidebar_none_posts);
if (function_exists('wma_meta_option') && 'sections' == wma_meta_option('sidebar')) {
    $sections_layout = true;
} else {
    $sections_layout = false;
}
/**
 * Sidebar implementation
 *
 * Variables setup
 */
$sidebar = wm_sidebar_setup();
/**
 * Actual page/post output
 */
if (!$sections_layout) {
    echo "\r\n\r\n" . '<div class="wrap-inner">';
    $content_area_class = $sidebar['class_main'];
}
echo "\r\n\t" . '<div class="content-area site-content' . $content_area_class . '">' . "\r\n\r\n";
wmhook_entry_before();
if (have_posts()) {
    the_post();
    if ($sidebar_none_posts) {
        /**
         * Remove JetPack sharing when Sections used
         */