function kleo_extra_sidebar() { $classes = apply_filters('kleo_extra_sidebar_classes', ''); echo '<div class="sidebar sidebar-extra ' . $classes . '">' . '<div class="inner-content">'; generated_dynamic_sidebar('extra'); echo '</div>' . '</div> <!--end sidebar columns-->'; }
function add_sidebar() { global $smof_data, $post; if (is_shop()) { $pageID = get_option('woocommerce_shop_page_id'); } elseif (is_product_category() || is_product_tag()) { $pageID = ''; } else { $pageID = $post->ID; } $custom_fields = get_post_custom_values('_wp_page_template', $pageID); if (is_array($custom_fields) && !empty($custom_fields)) { $page_template = $custom_fields[0]; } else { $page_template = ''; } $content_css = ''; $sidebar_css = ''; $sidebar_2_css = ''; $sidebar_exists = true; $sidebar_left = ''; $double_sidebars = false; $sidebar_1 = get_post_meta($pageID, 'sbg_selected_sidebar_replacement', true); $sidebar_2 = get_post_meta($pageID, 'sbg_selected_sidebar_2_replacement', true); if (is_product() || is_shop()) { if ($smof_data['woo_global_sidebar']) { if ($smof_data['woo_sidebar'] != 'None') { $sidebar_1 = array($smof_data['woo_sidebar']); } else { $sidebar_1 = ''; } if ($smof_data['woo_sidebar_2'] != 'None') { $sidebar_2 = array($smof_data['woo_sidebar_2']); } else { $sidebar_2 = ''; } } } if (is_array($sidebar_1) && $sidebar_1[0] && (is_array($sidebar_2) && $sidebar_2[0])) { $double_sidebars = true; } if (is_array($sidebar_1) && ($sidebar_1[0] || $sidebar_1[0] === '0')) { $sidebar_exists = true; } else { $sidebar_exists = false; } if (is_product_category() || is_product_tag()) { $sidebar_1 = $smof_data['woocommerce_archive_sidebar']; $sidebar_2 = $smof_data['woocommerce_archive_sidebar_2']; if ($sidebar_1 != 'None' && $sidebar_2 != 'None') { $double_sidebars = true; } if ($sidebar_1 == 'None') { $sidebar_exists = false; } else { $sidebar_exists = true; } } if ($page_template == '100-width.php') { $content_css = 'width:100%'; $sidebar_css = 'display:none'; } elseif (!$sidebar_exists) { $content_css = 'width:100%'; $sidebar_css = 'display:none'; $sidebar_exists = false; } elseif (get_post_meta($pageID, 'pyre_sidebar_position', true) == 'left') { $content_css = 'float:right;'; $sidebar_css = 'float:left;'; $sidebar_left = 1; } elseif (get_post_meta($pageID, 'pyre_sidebar_position', true) == 'right') { $content_css = 'float:left;'; $sidebar_css = 'float:right;'; } elseif (get_post_meta($pageID, 'pyre_sidebar_position', true) == 'default' || !metadata_exists('post', $pageID, 'pyre_sidebar_position')) { if ($smof_data['woo_sidebar_position'] == 'Left') { $content_css = 'float:right;'; $sidebar_css = 'float:left;'; $sidebar_exists = true; $sidebar_left = 1; } elseif ($smof_data['woo_sidebar_position'] == 'Right') { $content_css = 'float:left;'; $sidebar_css = 'float:right;'; $sidebar_exists = true; $sidebar_left = 2; } } if (get_post_meta($pageID, 'pyre_sidebar_position', true) == 'right') { $sidebar_left = 2; } if ($smof_data['woo_global_sidebar']) { if (is_product() || is_shop()) { if ($smof_data['woo_sidebar'] != 'None') { if ($smof_data['woo_sidebar_position'] == 'Left') { $content_css = 'float:right;'; $sidebar_css = 'float:left;'; $sidebar_left = 1; } elseif ($smof_data['woo_sidebar_position'] == 'Right') { $content_css = 'float:left;'; $sidebar_css = 'float:right;'; $sidebar_left = 2; } } if ($smof_data['woo_sidebar'] != 'None' && $smof_data['woo_sidebar_2'] != 'None') { $double_sidebars = true; } } if (is_product_category() || is_product_tag()) { if ($smof_data['woocommerce_archive_sidebar'] != 'None') { if ($smof_data['woo_sidebar_position'] == 'Left') { $content_css = 'float:right;'; $sidebar_css = 'float:left;'; $sidebar_left = 1; } elseif ($smof_data['woo_sidebar_position'] == 'Right') { $content_css = 'float:left;'; $sidebar_css = 'float:right;'; $sidebar_left = 2; } } if ($smof_data['woocommerce_archive_sidebar'] != 'None' && $smof_data['woocommerce_archive_sidebar_2'] != 'None') { $double_sidebars = true; } } } if (is_product_category() || is_product_tag()) { if ($smof_data['woocommerce_archive_sidebar'] != 'None') { if ($smof_data['woo_sidebar_position'] == 'Left') { $content_css = 'float:right;'; $sidebar_css = 'float:left;'; $sidebar_left = 1; } elseif ($smof_data['woo_sidebar_position'] == 'Right') { $content_css = 'float:left;'; $sidebar_css = 'float:right;'; $sidebar_left = 2; } } if ($smof_data['woocommerce_archive_sidebar'] != 'None' && $smof_data['woocommerce_archive_sidebar_2'] != 'None') { $double_sidebars = true; } } if ($double_sidebars == true) { $content_css = 'float:left;'; $sidebar_css = 'float:left;'; $sidebar_2_css = 'float:left;'; } else { $sidebar_left = 1; } if (is_product() || is_shop()) { if ($smof_data['woo_global_sidebar']) { if ($smof_data['woo_sidebar'] != 'None') { $sidebar_1 = $smof_data['woo_sidebar']; } if ($smof_data['woo_sidebar_2'] != 'None') { $sidebar_2 = $smof_data['woo_sidebar_2']; } } else { if (is_array($sidebar_1) && $sidebar_1[0] != '') { $sidebar_1 = $sidebar_1[0]; } if (is_array($sidebar_2) && $sidebar_2[0] != '') { $sidebar_2 = $sidebar_2[0]; } } } if ($sidebar_exists == true) { echo '<div id="sidebar" class="sidebar" style="' . $sidebar_css . '">'; wp_reset_query(); if ($sidebar_left == 1) { if (is_product() || is_shop()) { generated_dynamic_sidebar($sidebar_1); } elseif (is_product_category() || is_product_tag()) { generated_dynamic_sidebar($smof_data['woocommerce_archive_sidebar']); } else { $shop_page_id = get_option('woocommerce_shop_page_id'); $name = get_post_meta($shop_page_id, 'sbg_selected_sidebar_replacement', true); if ($name) { generated_dynamic_sidebar($name[0]); } } } if ($sidebar_left == 2) { wp_reset_query(); if (is_product() || is_shop()) { generated_dynamic_sidebar_2($sidebar_2); } elseif (is_product_category() || is_product_tag()) { generated_dynamic_sidebar($smof_data['woocommerce_archive_sidebar_2']); } else { $shop_page_id = get_option('woocommerce_shop_page_id'); $name = get_post_meta($shop_page_id, 'sbg_selected_sidebar_2_replacement', true); if ($name) { generated_dynamic_sidebar($name[0]); } } } echo '</div>'; if ($double_sidebars == true) { echo '<div id="sidebar-2" class="sidebar" style="' . $sidebar_2_css . '">'; if ($sidebar_left == 1) { wp_reset_query(); if (is_product() || is_shop()) { generated_dynamic_sidebar_2($sidebar_2); } elseif (is_product_category() || is_product_tag()) { generated_dynamic_sidebar($smof_data['woocommerce_archive_sidebar_2']); } else { $shop_page_id = get_option('woocommerce_shop_page_id'); $name = get_post_meta($shop_page_id, 'sbg_selected_sidebar_2_replacement', true); if ($name) { generated_dynamic_sidebar($name[0]); } } } if ($sidebar_left == 2) { if (is_product() || is_shop()) { generated_dynamic_sidebar($sidebar_1); } elseif (is_product_category() || is_product_tag()) { generated_dynamic_sidebar($smof_data['woocommerce_archive_sidebar']); } else { $shop_page_id = get_option('woocommerce_shop_page_id'); $name = get_post_meta($shop_page_id, 'sbg_selected_sidebar_replacement', true); if ($name) { generated_dynamic_sidebar($name[0]); } } } echo '</div>'; } } }
<?php if ($sidebar_left == 1) { generated_dynamic_sidebar($sidebar_1); } if ($sidebar_left == 2) { generated_dynamic_sidebar_2($sidebar_2); } ?> </div> <?php if ($double_sidebars == true) { ?> <div id="sidebar-2" class="sidebar" style="<?php echo $sidebar_2_css; ?> "> <?php if ($sidebar_left == 1) { generated_dynamic_sidebar_2($sidebar_2); } if ($sidebar_left == 2) { generated_dynamic_sidebar($sidebar_1); } ?> </div> <?php } ?> <?php } get_footer();
<div class="one_third last"> <h3><?php echo __('Try again!', 'Avada'); ?> </a></h3> <p><?php echo __('If you want to rephrase your query, here is your chance:', 'Avada'); ?> </p> <?php get_search_form(); ?> </div> </div> </div> <?php } ?> </div> <div id="sidebar" style="<?php echo $sidebar_css; ?> "> <?php if ($data['search_sidebar'] != 'None' && function_exists('dynamic_sidebar')) { generated_dynamic_sidebar($data['search_sidebar']); } ?> </div> <?php get_footer();
<a href="<?php bloginfo('url'); ?> /" class="button right"><?php _e("Return to Home page", 'raw_theme'); ?> </a> </article> <!-- SIDEBAR --> <ul id="article-sidebar"> <?php if (!function_exists('dynamic_sidebar') || !generated_dynamic_sidebar(__('404 Sidebar', 'raw_theme'))) { ?> <?php } ?> </ul> </div> </div> <div id="push"></div>
$sidebar_css = 'display:none'; } elseif (get_post_meta($pageID, 'pyre_sidebar_position', true) == 'left') { $content_css = 'float:right;'; $sidebar_css = 'float:left;'; } elseif (get_post_meta($pageID, 'pyre_sidebar_position', true) == 'right') { $content_css = 'float:left;'; $sidebar_css = 'float:right;'; } elseif (get_post_meta($pageID, 'pyre_sidebar_position', true) == 'default') { if ($data['default_sidebar_pos'] == 'Left') { $content_css = 'float:right;'; $sidebar_css = 'float:left;'; } elseif ($data['default_sidebar_pos'] == 'Right') { $content_css = 'float:left;'; $sidebar_css = 'float:right;'; } } ?> <div id="sidebar"> <?php wp_reset_query(); if (is_product()) { generated_dynamic_sidebar(); } else { $shop_page_id = get_option('woocommerce_shop_page_id'); $name = get_post_meta($shop_page_id, 'sbg_selected_sidebar_replacement', true); if ($name) { generated_dynamic_sidebar($name[0]); } } ?> </div>
function add_sidebar() { global $post; if (is_shop()) { $pageID = get_option('woocommerce_shop_page_id'); } elseif (is_product_category() || is_product_tag()) { $pageID = ''; } else { $pageID = $post->ID; } $custom_fields = get_post_custom_values('_wp_page_template', $pageID); if (is_array($custom_fields) && !empty($custom_fields)) { $page_template = $custom_fields[0]; } else { $page_template = ''; } $evolve_layout = evolve_get_option('evl_layout', '2cl'); $sidebar_css = ''; if (class_exists('Woocommerce')) { if ($evolve_layout == "1c" || is_cart() || is_checkout() || is_account_page() || get_option('woocommerce_thanks_page_id') && is_page(get_option('woocommerce_thanks_page_id'))) { $sidebar_css = 'display:none'; } } echo '<div id="secondary" class="aside '; if ($evolve_layout == "1c") { } if ($evolve_layout == "3cm" || $evolve_layout == "3cl" || $evolve_layout == "3cr") { echo 'col-xs-12 col-sm-6 col-md-3'; } else { echo 'col-sm-6 col-md-4'; } echo '"'; if (class_exists('Woocommerce')) { echo 'style="' . $sidebar_css . '"'; } echo '>'; wp_reset_query(); if (is_product()) { generated_dynamic_sidebar(); } elseif (is_product_category() || is_product_tag()) { $shop_page_id = get_option('woocommerce_shop_page_id'); $name = get_post_meta($shop_page_id, 'sbg_selected_sidebar_replacement', true); if ($name) { generated_dynamic_sidebar($name[0]); } } else { $shop_page_id = get_option('woocommerce_shop_page_id'); $name = get_post_meta($shop_page_id, 'sbg_selected_sidebar_replacement', true); if ($name) { generated_dynamic_sidebar($name[0]); } } echo '</div>'; }
<?php } ?> </div> </div> <?php $prev_post_timestamp = $post_timestamp; $prev_post_month = $post_month; $post_count++; } ?> </div> <?php themefusion_pagination($pages = '', $range = 2); ?> </div> <?php wp_reset_query(); ?> <div id="sidebar" style="<?php echo $sidebar_css; ?> "> <?php if ($data['blog_archive_sidebar'] != 'None' && function_exists('dynamic_sidebar')) { generated_dynamic_sidebar($data['blog_archive_sidebar']); } ?> </div> <?php get_footer();
<?php } else if (epanel_option('footer_columns') == 'four' ) { ?> <div class="one_fourth"> <?php if ( !function_exists('dynamic_sidebar') || ! generated_dynamic_sidebar('Footer Column 1') ) ; ?> </div> <div class="one_fourth"> <?php if ( !function_exists('dynamic_sidebar') || ! generated_dynamic_sidebar('Footer Column 2') ) ; ?> </div> <div class="one_fourth"> <?php if ( !function_exists('dynamic_sidebar') || ! generated_dynamic_sidebar('Footer Column 3') ) ; ?> </div> <div class="one_fourth last"> <?php if ( !function_exists('dynamic_sidebar') || ! generated_dynamic_sidebar('Footer Column 4') ) ; ?> </div> <?php } ?> </div> <div class="clearfix"></div> <div id="footer-bottom" class="footer_wrap"> <div class="container"> <div class="footer-left"> <?php if (epanel_option('footer_left_content') == 'content' ) { echo stripslashes(epanel_option('custom_footer_left_content')); }
?> <!-- No Comments --> <?php } ?> </div> <!-- Content ends here --> <!-- Sidebar begins here --> <?php if ($data['wm_page_sidebar_enabled'] == "1" && get_post_meta($postParentPageID, 'page_sidebar_hide', true) == "") { ?> <div id="sidebar"> <?php if (!function_exists('generated_dynamic_sidebar') || !generated_dynamic_sidebar("Pages Sidebar")) { } ?> </div> <?php } ?> <!-- Sidebar ends here--> <?php } } ?> <?php
<br /><br /> </div> <!-- Post ends here --> </div> <!-- Content ends here --> <!-- Sidebar --> <?php if ($data['wm_sidebar_enabled'] == "1" && get_post_meta($postParentPageID, 'page_sidebar_hide', true) == "") { ?> <div id="sidebar"> <?php if (!function_exists('generated_dynamic_sidebar') || !generated_dynamic_sidebar("Contact Page Sidebar")) { ?> <?php } ?> </div> <?php } ?> <!-- Sidebar ends here--> <?php } } ?>
</div> <div class="text-center"> <?php t4p_pagination($pages = '', $range = 2); ?> </div> </div> <?php if ($sidebar_exists == true) { ?> <?php wp_reset_query(); ?> <div id="sidebar" style="<?php echo $sidebar_css; ?> " class="<?php echo $sidebar_class; ?> "><?php generated_dynamic_sidebar($evl_portfolio_sidebar); ?> </div> <?php } ?> <?php get_footer();
<?php if (class_exists('Tribe__Events__Main') && is_singular('tribe_events')) { ?> <?php do_action('tribe_events_single_event_before_the_meta'); ?> <?php tribe_get_template_part('modules/meta'); ?> <?php do_action('tribe_events_single_event_after_the_meta'); ?> <?php } ?> <?php } ?> <?php if (isset(Avada()->layout->sidebars['sidebar_1']) && Avada()->layout->sidebars['sidebar_1']) { ?> <?php generated_dynamic_sidebar(Avada()->layout->sidebars['sidebar_1']); ?> <?php } ?> </div>
</div> <?php wp_reset_postdata(); } ?> </div> <!-- Content ends here --> <!-- Sidebar begins here --> <?php if ($data['wm_sidebar_enabled'] == "1" && get_post_meta($postParentPageID, 'page_sidebar_hide', true) == "") { ?> <div id="sidebar"> <?php //get_sidebar(); ?> <?php if (!function_exists('generated_dynamic_sidebar') || !generated_dynamic_sidebar("Main Blog Sidebar")) { } ?> </div> <?php } ?> <!-- Sidebar ends here--> <?php get_footer();
<?php if(get_post_meta($post->ID, 'pyre_video_url', true)) { $full_image[0] = get_post_meta($post->ID, 'pyre_video_url', true); } ?> <a style="<?php echo $zoom_icon_css; ?>" class="icon gallery-icon" href="<?php echo $full_image[0]; ?>" rel="prettyPhoto[gallery]">Gallery</a> <h3><?php the_title(); ?></h3> </div> </div> </div> </li> <?php endif; endwhile; ?> </ul> </div> <div class="es-nav"><span class="es-nav-prev">Previous</span><span class="es-nav-next">Next</span></div> </div> </div> <?php endif; ?> <?php endif; ?> <?php if($data['blog_comments']): ?> <?php wp_reset_query(); ?> <?php comments_template(); ?> <?php endif; ?> </div> <?php endif; ?> </div> <div id="sidebar" style="<?php echo $sidebar_css; ?>"> <?php generated_dynamic_sidebar(); ?> </div> <?php get_footer(); ?>
stopLoop:"off", stopAfterLoops:-1, stopAtSlide:-1, shuffle:"off", hideSliderAtLimit:0, hideCaptionAtLimit:0, hideAllCaptionAtLilmit:0, startWithSlide:0 }); }); //ready </script> <!-- END REVOLUTION SLIDER --> <?php the_content(); ?> <?php wp_link_pages(); ?> </div> <?php if($data['comments_pages']): ?> <?php wp_reset_query(); ?> <?php comments_template(); ?> <?php endif; ?> </div> <?php endif; ?> </div> <div id="sidebar" style="<?php echo $sidebar_css; ?>"><?php generated_dynamic_sidebar(); ?></div> <?php get_footer(); ?>
get_template_part('template/blog/single/content'); } } else { get_template_part('content', 'none'); } ?> </section> <?php if ($layout != 1) { ?> <aside class="roen-col col-lg-3 col-md-4 col-sm-4 roen-<?php echo $layout_class; ?> "><?php generated_dynamic_sidebar($sidebar_name); ?> </aside> <?php } ?> </div> <?php get_template_part('template/blog/single/related'); ?> </div> <?php get_footer();
<li class="post-time"><strong><?php _e('On : ','epanel');?></strong><?php the_time(get_option('ep_blog_date_format')); ?></li> <?php } ?> <?php if (get_option('ep_blog_show_comments') != 'false') { ?> <li class="post-comments"><a href="<?php the_permalink();?>"><?php comments_number( __(' Leave a comment', 'epanel'), __(' One comment', 'epanel'), __(' % comments', 'epanel')); ?></a></li> <?php } ?> </ul> <a class="read-more-link" href="<?php the_permalink();?>"><?php _e('Continue Reading »', 'epanel');?></a> </div> </div><!-- End Post layout --> <?php endwhile; ?> <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?> </div> <div class="one_fourth last" id="sidebar"> <?php if ( !function_exists('dynamic_sidebar') || ! generated_dynamic_sidebar('Page Sidebar') ) ; ?> </div> <?php } ?> <div class="clearfix"></div> </div> </div> <?php get_footer();?>
function add_sidebar() { global $smof_data, $post; if (is_shop()) { $pageID = get_option('woocommerce_shop_page_id'); } else { $pageID = $post->ID; } $custom_fields = get_post_custom_values('_wp_page_template', $pageID); if (is_array($custom_fields) && !empty($custom_fields)) { $page_template = $custom_fields[0]; } else { $page_template = ''; } $sidebar_css = ''; if ($page_template == '100-width.php') { $content_css = 'width:100%'; $sidebar_css = 'display:none'; } elseif (get_post_meta($pageID, 'pyre_full_width', true) == 'yes' || $page_template == 'full-width.php') { $content_css = 'width:100%'; $sidebar_css = 'display:none'; } elseif (get_post_meta($pageID, 'pyre_sidebar_position', true) == 'left') { $content_css = 'float:right;'; $sidebar_css = 'float:left;'; } elseif (get_post_meta($pageID, 'pyre_sidebar_position', true) == 'right') { $content_css = 'float:left;'; $sidebar_css = 'float:right;'; } elseif (get_post_meta($pageID, 'pyre_sidebar_position', true) == 'default') { if ($smof_data['default_sidebar_pos'] == 'Left') { $content_css = 'float:right;'; $sidebar_css = 'float:left;'; } elseif ($smof_data['default_sidebar_pos'] == 'Right') { $content_css = 'float:left;'; $sidebar_css = 'float:right;'; } } if (is_product_category() || is_product_tag()) { if ($smof_data['woocommerce_archive_sidebar'] == 'None') { $content_css = 'width:100%'; $sidebar_css = 'display:none'; } else { if ($smof_data['default_sidebar_pos'] == 'Left') { $content_css = 'float:right;'; $sidebar_css = 'float:left;'; } elseif ($smof_data['default_sidebar_pos'] == 'Right') { $content_css = 'float:left;'; $sidebar_css = 'float:right;'; } } } echo '<div id="sidebar" style="' . $sidebar_css . '">'; wp_reset_query(); if (is_product()) { generated_dynamic_sidebar(); } elseif (is_product_category() || is_product_tag()) { generated_dynamic_sidebar($smof_data['woocommerce_archive_sidebar']); } else { $shop_page_id = get_option('woocommerce_shop_page_id'); $name = get_post_meta($shop_page_id, 'sbg_selected_sidebar_replacement', true); if ($name) { generated_dynamic_sidebar($name[0]); } } echo '</div>'; }
<div id="sidebar"> <?php generated_dynamic_sidebar('Default Sidebar'); ?> </div>
</div> <div class="clr"></div> </div> <div class="blogpost_split"></div> <?php } ?> <?php kriesi_pagination($blog->max_num_pages, $range = 20); ?> </div> <!--BEGIN #sidebar .aside--> <div class="sidebar" style="<?php echo $sidebar; ?> "> <?php //generated_dynamic_sidebar(); if (!function_exists('generated_dynamic_sidebar') || !generated_dynamic_sidebar()) { } ?> <!--END #sidebar .aside--> </div> <div class="clr"></div> </div> <div class="clr"></div> <?php get_footer();
?> </div> <?php if ($p_sidebar == 'right' || $p_sidebar == 'left') { ?> <div id="sidebar" class=" <?php if ($p_sidebar == 'right') { echo "right_sb"; } else { echo "left_sb"; } if ($sb_style == 'business_sb') { echo " business_sidebar"; } ?> "> <?php if (is_active_sidebar('thefox_mc_sidebar')) { generated_dynamic_sidebar(); } ?> </div> <div class="clearfix"></div> <?php } ?> </div> </div> <?php get_footer();
<!-- begin sidebar --> <div class="clearfix visible-xs"></div> <?php $sidebar_class = ''; if (is_front_page()) { $sidebar_class .= ' '; } if (is_singular('post')) { $sidebar_class .= ' sidebar_post '; } if ('no sidebar' != $options['sidebar_class'] && '' != $options['sidebar_class'] && 'none' != $options['sidebar_class']) { ?> <div class="col-xs-12 <?php print $options['sidebar_class'] . ' ' . $sidebar_class; ?> widget-area-sidebar" id="primary" > <ul class="xoxo"> <?php generated_dynamic_sidebar($options['sidebar_name']); ?> </ul> </div> <?php } ?> <!-- end sidebar -->
} ?> <?php if ($portfolio_sep == true) { ?> <div class="demo-sep sep-double" style="margin-top:50px;"></div> <?php } ?> </div> <?php } } ?> </div> <?php themefusion_pagination($gallery->max_num_pages, $range = 2); ?> </div> <div id="sidebar" style="<?php echo $sidebar_css; ?> "> <?php if ($data['portfolio_archive_sidebar'] != 'None' && function_exists('dynamic_sidebar')) { generated_dynamic_sidebar($data['portfolio_archive_sidebar']); } ?> </div> <?php get_footer();
if ($ts_show_sidebar == 'yes') { $ts_sbs = $ts_sidebar_selection_id = ''; $ts_sidebar_selection = get_post_meta($ts_page_id, '_sbg_selected_sidebar_replacement', true); $ts_sidebar_selection = is_array($ts_sidebar_selection) ? $ts_sidebar_selection[0] : $ts_sidebar_selection; if ($ts_sidebar_selection && class_exists('sidebar_generator')) { $ts_sidebar_selection_options = sidebar_generator::get_sidebars(); $ts_sidebar_selection_name = $ts_sbs = str_replace(array("\n", "\r", "\t", ' '), '', $ts_sidebar_selection); $ts_sidebar_selection_id = sidebar_generator::name_to_class($ts_sidebar_selection_name); if (!isset($ts_sidebar_selection_options[$ts_sidebar_selection_id])) { $ts_sidebar_selection = 0; } } ?> <div id="sidebar" class="<?php echo esc_attr($ts_sbs); ?> sidebar <?php echo esc_attr('sidebar-' . $ts_sidebar_position); ?> "> <?php if ($ts_sidebar_selection && class_exists('sidebar_generator') && is_active_sidebar('ts-custom-sidebar-' . strtolower($ts_sidebar_selection_id))) { generated_dynamic_sidebar($ts_sidebar_selection); } elseif (is_active_sidebar('ts-primary-sidebar')) { dynamic_sidebar('ts-primary-sidebar'); } ?> </div> <?php }