<?php
if( is_active_sidebar( 'spacious_business_page_top_section_left_half_sidebar' ) ||is_active_sidebar(
'spacious_business_page_top_section_right_half_sidebar' )) {
?>
<!--<div class="clearfix"> -->
<div class="top-one-half">
<?php
// Calling the business page top section left half sidebar if it exists.
if ( !dynamic_sidebar( 'spacious_business_page_top_section_left_half_sidebar' ) ):
endif;
?>
</div>
<div class=top-one half top-one-half-last">
<?php
// Calling the business page middle section right half sidebar if it exists.
if ( !dynamic_sidebar( 'spacious_business_page_top_section_right_half_sidebar' ) ):
endif;
?>
</div>
<div class="clearfix"></div>
<?php
if( is_active_sidebar( 'spacious_business_page_middle_section_left_half_sidebar' ) || is_active_sidebar( 'spacious_business_page_middle_section_right_half_sidebar' )) {
?>
<! --<div class="clearfix"> -->
<div class="tg-one-half">
<?php
// Calling the business page middle section left half sidebar if it exists.
if ( !dynamic_sidebar( 'spacious_business_page_middle_section_left_half_sidebar' ) ):
endif;
?>
</div>
<div class="tg-one-half tg-one-half-last">
<?php
// Calling the business page middle section right half sidebar if it exists.
if ( !dynamic_sidebar( 'spacious_business_page_middle_section_right_half_sidebar' ) ):
endif;
?>
</div>
<div class="clearfix"></div>
<?php
}
if( is_active_sidebar( 'spacious_business_page_bottom_section_sidebar' )) {
// Calling the business page bottom section sidebar if it exists.
if ( !dynamic_sidebar( 'spacious_business_page_bottom_section_sidebar' )):
endif;
}
?>
</div>
我还添加了以下代码widget.php,如下所示:
//注册商业页面模板顶部左半边栏 register_sidebar(array( &#39;名称&#39; =&GT; (&#39;业务左上边栏&#39;,&#39;宽敞&#39;), &#39; ID&#39; =&GT; &#39; spacious_business_page_top_section_left_half_sidebar&#39 ;, &#39;描述&#39; =&GT; __(&#39;在商家页面模板的左上方显示小部件。&#39;,&#39;宽敞的&#39;)。&#39; &#39;。(&#39;合适的小部件:TG:服务,TG:号召性用品小工具,TG:精选小工具&#39;,&#39;宽敞&#39;), &#39; before_widget&#39; =&GT; &#39;&#39 ;, &#39; after_widget&#39; =&GT; &#39;&#39 ;, &#39; before_title&#39; =&GT; &#39;&#39 ;, &#39; after_title&#39; =&GT; &#39;&#39; ));
// Registering Business Page template top section right half sidebar
register_sidebar( array(
'name' => __( 'Business Top right Sidebar', 'spacious' ),
'id' => 'spacious_business_page_top_section_right_half_sidebar',
'description' => __( 'Shows widgets on Business Page Template Top right Section.', 'spacious' ).' '.__( 'Suitable widget: TG: Services, TG: Call To Action Widget, TG: Featured Widget', 'spacious' ),
'before_widget' => '<section id="%1$s" class="widget %2$s clearfix">',
'after_widget' => '</section>',
'before_title' => '<h1 class="widget-title">',
'after_title' => '</h1>'
) );
但它没有显示结果而是抛出错误。什么是错误????