TwentyTwelve

Theme TwentyTwelve

Footer-Widgets einfügen

Twenty-Twelve lässt standardmäßig keine Footer-Widgets zu.

In functions.php einfügen:

register_sidebar( array(
'name' => 'Sidebar-Footer 1',
'id' => 'sidebar-footer-1',
'description' => 'Footer-Area-Widgets',
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
register_sidebar( array(
'name' => 'Sidebar-Footer 2',
'id' => 'sidebar-footer-2',
'description' => 'Footer-Area-Widgets',
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
register_sidebar( array(
'name' => 'Sidebar-Footer 3',
'id' => 'sidebar-footer-3',
'description' => 'Footer-Area-Widgets',
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );

In footer.php einfügen:

Direkt nach <footer id=“colophon“ role=“contentinfo“> einfügen:

<!-- footer widgets -->
<div id="footer-sidebar" class="secondary">
<div id="sidebar-footer1">
<?php
if(is_active_sidebar('sidebar-footer-1')){
dynamic_sidebar('sidebar-footer-1');
}
?>
</div>
<div id="sidebar-footer2">
<?php
if(is_active_sidebar('sidebar-footer-2')){
dynamic_sidebar('sidebar-footer-2');
}
?>
</div>
<div id="sidebar-footer3">
<?php
if(is_active_sidebar('sidebar-footer-3')){
dynamic_sidebar('sidebar-footer-3');
}
?>
</div>
</div>
<!-- footer widgets end -->

CSS

#sidebar-footer {
display:block;
height: 250px;
}

#sidebar-footer1 {
float: left;
width: 340px;
margin-left:5px;
margin-right:5px;
}

#sidebar-footer2 {
float: left;
width: 340px;
margin-right:5px;
}

#sidebar-footer3 {
float: left;
width: 340px;
}

 

Grafik-Schatten (Shadow) im Widgetbereich deaktivieren

.widget img{
box-shadow: none;
}