之后如何分配功能</section>
?入阵?
<?php
function roots_widgets_init() {
register_sidebar(array(
'name' => __('Footer', 'roots'),
'id' => 'sidebar-footer',
'before_widget' => '<section class="widget span4 %1$s %2$s"><div class="widget-inner">',
'after_widget' => '</div></section>',
'before_title' => '<h3>',
'after_title' => '</h3>',
));
}
?>
编辑#1(我想出了这个,但它不能正常工作。我试图</div><div class="row-fluid">
每3个假发/部分产生一次。):
<?php
$i = 1;
function name () {
if($i % 3 == 0) {
return "</div><div class=\"row-fluid\">";
} else {
return;
}
$i++;
}
function roots_widgets_init() {
register_sidebar(array(
'name' => __('Footer', 'roots'),
'id' => 'sidebar-footer',
'before_widget' => '<section class="widget span4 %1$s %2$s"><div class="widget-inner">',
'after_widget' => '</div></section>' . name(),
'before_title' => '<h3>',
'after_title' => '</h3>',
));
}
?>
多谢你们!