本文整理汇总了PHP中generated_dynamic_sidebar_2函数的典型用法代码示例。如果您正苦于以下问题:PHP generated_dynamic_sidebar_2函数的具体用法?PHP generated_dynamic_sidebar_2怎么用?PHP generated_dynamic_sidebar_2使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了generated_dynamic_sidebar_2函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generated_dynamic_sidebar
<?php
if ($sidebar_left == 1) {
generated_dynamic_sidebar();
}
if ($sidebar_left == 2) {
generated_dynamic_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();
}
if ($sidebar_left == 2) {
generated_dynamic_sidebar();
}
?>
</div>
<?php
}
?>
<?php
}
get_footer();
示例2: generated_dynamic_sidebar
<?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();
示例3: add_sidebar
//.........这里部分代码省略.........
$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>';
}
}
}