Codice PHP:

<?php
if ( ! function_exists'bavotasan_widgets_init' ) ) {


function 
bavotasan_widgets_init() {
$bavotasan_theme_options bavotasan_theme_options();


register_sidebar( array(
'name' => __'First Sidebar''destin' ),
'id' => 'sidebar',
'description' => __'This is the first sidebar. It won&rsquo;t appear on the home page unless you set a static front page.''destin' ),
'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' => __'Second Sidebar''destin' ),
'id' => 'second-sidebar',
'description' => __'This is the second sidebar. It won&rsquo;t appear on the home page unless you set a static front page and have added at least one widget.''destin' ),
'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' => __'Home Page Corner''destin' ),
'id' => 'home-page-corner',
'description' => __'Area in the top right on the home page. Add at least one widget to make it appear.''destin' ),
'before_widget' => '<aside id="%1$s" class="home-widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );


register_sidebar( array(
'name' => __'Extended Footer''destin' ),
'id' => 'extended-footer',
'description' => __'This is the extended footer. You can set the number of columns in the customizer. Add at least one widget to make it appear.''destin' ),
'before_widget' => '<aside id="%1$s" class="footer-widget ' esc_attr$bavotasan_theme_options['extended_footer_columns'] ) . ' %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );


register_sidebar( array(
'name' => __'Footer Notice''destin' ),
'id' => 'footer-notice',
'description' => __'This is the footer notice area. It works best with a copyright notice or a banner ad.''destin' ),
'before_widget' => '<aside id="%1$s" class="footer-notice pull-left %2$s">',
'after_widget' => '</aside>',
'before_title' => '',
'after_title' => '',
) );


register_sidebar( array(
'name' => __('Header''twentyeleven'),
'id' => 'header',
'description' => __('An optional widget area for your site header''twentyeleven'),
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );


}


}


?>


<?php
if ( ! function_exists'bavotasan_front_page_render' ) ) {


function 
bavotasan_front_page_render() {
global 
$wp_query$paged;
?>
<?php 
while ( have_posts() ) : the_post(); ?>
<?php 
if ( is_front_page() ) { ?>
<div class="item">
<figure class="effect-julia">
<?php
if ( has_post_thumbnail() )
the_post_thumbnail'home' );
else
echo 
'<img src="' BAVOTASAN_THEME_URL '/library/images/no-image.jpg" alt="" />';
?>
<figcaption>
<h2><?php the_title(); ?></h2>
<div>
<p><?php echo wp_trim_wordsstrip_shortcodesget_the_excerpt() ) , 10 ); ?></p>
<p class="more-link-p"><?php _e'Continua a leggere <span class="meta-nav">&rarr;</span>''destin' ); ?></p>
</div>
<a href="<?php the_permalink(); ?>"><?php _e'View more''destin' ); ?></a>
</figcaption>
</figure>
</div>
<?php } else { ?>
<?php get_template_part
'content'get_post_format() ); ?>
<?php 
?>
<?php 
endwhile; ?>
<?php
}
}

endif; 
?>