Ciao a tutti, capisco poco del Vs mondo ma sto studiando. In questo momento ho da chiedervi un problema per me insormontabile!

Sto modificando il file function di un tema child cioè sto cercando di dargli diverse istruzioni per le funzioni.

Ho scritto il seguente codice che è la somma di più condizioni diverse, ciascuna per ogni funzione del tema. La prima parte del codice funziona, cioè quella relativa alla prima condizione. Quando però cerco di avviare una catena sul mio bel file functions (del tema child) di condizioni mi appare la pagina bianca, quasi certamente per un errore di sintassi. Potete indicarmi quale sia l'errore e perché?
A leggere gli articoli su internet comprendo quali siano le problematiche del codice ma mi manca l'esperienza per scriverlo e certamente c'è qualche problema.

vi ringrazio in anticipo. Il codice che ho scritto è questo e vi scrivo solo le prime due perché penso che il problema stia tra la prima e la seconda (per intuizione).

<?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>',
&nbsp );


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>',
&nbsp );


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>',
&nbsp );


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>',
&nbsp );


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' => '',
&nbsp );


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_words( strip_shortcodes( get_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
}
}

?>

Grazie a tutti,
Andrea