本文整理汇总了PHP中get_sidebar函数的典型用法代码示例。如果您正苦于以下问题:PHP get_sidebar函数的具体用法?PHP get_sidebar怎么用?PHP get_sidebar使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_sidebar函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ing_woo_page_end
function ing_woo_page_end()
{
do_action("ing_content_close");
get_sidebar();
do_action("ing_page_close");
echo "<!-- this is where this is happening -->";
}
示例2: comicpress_display_comic_area
function comicpress_display_comic_area()
{
global $post, $wp_query, $comicpress_options;
if (comicpress_check_child_file('partials/displaycomic') == false) {
?>
<div id="comic-wrap">
<div id="comic-head"><?php
get_sidebar('over');
?>
</div>
<div class="clear"></div>
<?php
get_sidebar('comicleft');
?>
<div id="comic"><?php
comicpress_display_comic();
?>
</div>
<?php
get_sidebar('comicright');
?>
<div class="clear"></div>
<div id="comic-foot"><?php
get_sidebar('under');
?>
</div>
</div>
<?php
}
}
示例3: miss_get_sidebar
/**
*
*/
function miss_get_sidebar()
{
wp_reset_query();
global $wp_query;
if (is_404()) {
return;
}
$sidebar = true;
if (is_singular()) {
$type = get_post_type();
$post_obj = $wp_query->get_queried_object();
$template = get_post_meta($post_obj->ID, '_wp_page_template', true);
$_layout = get_post_meta($post_obj->ID, '_layout', true);
if ($_layout == 'full_width') {
$sidebar = false;
}
if ($type == 'portfolio' && empty($_layout)) {
$sidebar = false;
}
if ($template == 'templates/template-wiki.php') {
$sidebar = false;
}
if (strpos($post_obj->post_content, '[portfolio') !== false && empty($_layout)) {
$sidebar = false;
}
}
if (is_front_page() && !is_active_sidebar('home')) {
$sidebar = false;
}
$sidebar = apply_atomic('get_sidebar', $sidebar);
if ($sidebar == true) {
get_sidebar();
}
}
示例4: whitelight_after_content
function whitelight_after_content()
{
?>
<?php
if (is_search() && is_post_type_archive()) {
add_filter('woo_pagination_args', 'woocommerceframework_add_search_fragment', 10);
}
?>
<?php
woo_pagenav();
?>
</div><!-- /#main -->
<?php
woo_main_after();
?>
<?php
get_sidebar();
?>
</div>
</div><!-- /#content -->
<?php
woo_content_after();
?>
<?php
}
示例5: tc_sidebar_display
/**
* Returns the sidebar or the front page featured pages area
* @param Name of the widgetized area
* @package Customizr
* @since Customizr 1.0
*/
function tc_sidebar_display()
{
//first check if home and no content option is choosen
if (tc__f('__is_home_empty')) {
return;
}
//gets current screen layout
$screen_layout = tc__f('__screen_layout', tc__f('__ID'), 'sidebar');
//gets position from current hook and checks the context
$position = apply_filters('tc_sidebar_position', strpos(current_filter(), 'before') ? 'left' : 'right');
if ('left' == $position && $screen_layout != 'l' && $screen_layout != 'b') {
return;
}
if ('right' == $position && $screen_layout != 'r' && $screen_layout != 'b') {
return;
}
//gets the global layout settings
$global_layout = apply_filters('tc_global_layout', TC_init::$instance->global_layout);
$sidebar_layout = $global_layout[$screen_layout];
//defines the sidebar wrapper class
$class = sprintf('%1$s %2$s tc-sidebar', apply_filters("tc_{$position}_sidebar_class", $sidebar_layout['sidebar']), $position);
ob_start();
?>
<div class="<?php
echo $class;
?>
">
<div id="<?php
echo $position;
?>
" class="widget-area" role="complementary">
<?php
if (is_active_sidebar($position)) {
?>
<?php
do_action("__before_{$position}_sidebar");
##hook of social icons
?>
<?php
get_sidebar($position);
?>
<?php
do_action("__after_{$position}_sidebar");
?>
<?php
}
?>
</div><!-- #left -->
</div><!--.tc-sidebar -->
<?php
$html = ob_get_contents();
if ($html) {
ob_end_clean();
}
echo apply_filters('tc_sidebar_display', $html, $sidebar_layout, $position);
}
示例6: cleanyetibasic_sidebar
/**
* Get the standard sidebar
*
* This includes the primary and secondary widget areas.
* The sidebar can be switched on or off using cleanyetibasic_sidebar. <br>
* Default: ON <br>
*
* Filter: cleanyetibasic_sidebar
*/
function cleanyetibasic_sidebar()
{
$show = TRUE;
$show = apply_filters('cleanyetibasic_sidebar', $show);
if ($show) {
get_sidebar() . "\n\n";
}
return;
}
示例7: jc_sidebar_shortcode
function jc_sidebar_shortcode($atts, $content = "null")
{
extract(shortcode_atts(array('name' => ''), $atts));
ob_start();
get_sidebar($name);
$sidebar = ob_get_contents();
ob_end_clean();
return $sidebar;
}
示例8: udesign_theme_wrapper_end
function udesign_theme_wrapper_end()
{
echo ' </div><!-- end main-content-padding -->';
echo ' </div><!-- end main-content -->';
if (sidebar_exist('PagesSidebar8')) {
get_sidebar('PagesSidebar8');
}
echo '</div><!-- end content-container -->';
}
示例9: thematic_sidebar
/**
* Get the standard sidebar
*
* This includes the primary and secondary widget areas.
* The sidebar can be switched on or off using thematic_sidebar. <br>
* Default: ON <br>
*
* Filter: thematic_sidebar
*/
function thematic_sidebar()
{
$show = TRUE;
$show = apply_filters('thematic_sidebar', $show);
if ($show) {
get_sidebar();
}
return;
}
示例10: cpotheme_woocommerce_after_main_content
function cpotheme_woocommerce_after_main_content()
{
do_action('cpotheme_after_content');
echo '</section>';
get_sidebar();
do_action('cpotheme_woocommerce_after_sidebar');
echo '</div>';
echo '</div>';
}
示例11: get_sidebar_if_children
function get_sidebar_if_children()
{
global $post;
$children = get_pages('child_of=' . $post->ID);
$ancestors = $post->ancestors;
if (count($children) != 0 || $ancestors || is_page_template('page-faq.php')) {
get_sidebar();
}
}
示例12: my_theme_wrapper_end
function my_theme_wrapper_end()
{
echo '</main><!-- #main --></div><!-- #primary -->';
// don't show sidebar
echo '<div style="display:none;">';
get_sidebar();
echo '</div>';
echo '</div></div>';
}
示例13: sscarousel_slick_sidebar_shortcode
function sscarousel_slick_sidebar_shortcode()
{
ob_start();
get_sidebar("sscarousel_sidebar_slick_01");
$sidebar = "<div class=\"slider slick-slider-responsive\">";
$sidebar .= ob_get_contents();
$sidebar .= "</div>";
ob_end_clean();
return $sidebar;
}
示例14: webriti_rambo_wrapper_end
function webriti_rambo_wrapper_end()
{
if (is_active_sidebar('sidebar-primary')) {
echo "</div>";
get_sidebar();
echo "</div></div>";
} else {
echo "</div></div></div>";
}
}
示例15: sidebar
function sidebar($position)
{
$sidebar = $this->get('sidebar', $this->template);
if ($this->layout == $position) {
echo '<aside class="col-sm-4 col-md-3 col-lg-3 mythemes-sidebar sidebar-to-' . esc_attr($position) . '">';
get_sidebar(esc_attr($sidebar));
echo '</aside>';
return;
}
}