[WordPress] Problema inserimento widget nel footer

giuseppe_123

Utente Attivo
8 Set 2016
53
0
6
25
Il tema che ho installato su wordpress non aveva il footer per poter inserire i widget e dunque ho provveduto a crearla io nel tema child
Innanzitutto ho registrato la sidebar del footer nel file functions.php del tema child
PHP:
<?php
/**
* Fara functions and definitions
*
* @package Fara
*/
if ( ! function_exists( 'theme_special_nav' ) ) {
    function theme_special_nav() {
        //  Fai qualchecosa.
    }
}
/*---------REGISTRAZIONE FOOTER SITO-------*/



function fara_footer() {
    register_sidebar( array(
        'name'          => __( 'Footer', 'fara' ),
        'id'            => 'footer-1',
        'description'   => '',
        'before_widget' => '<div  class="foot_widget">',
        'after_widget'  => '</div>',
        'before_title'  => '<h3 class="widget-title">',
        'after_title'   => '</h3>',
    ) );


}
add_action( 'widgets_init', 'fara_footer');
?>
Poi l'ho richiamata nel file footer
PHP:
<?php
/**
* The template for displaying the footer.
*
* Contains the closing of the #content div and all content after
*
* @package Fara
*/
?>

   </div><!-- #content -->

   <footer id="colophon" class="site-footer" role="contentinfo">
      <div class="site-info container">
         <a href="<?php echo esc_url( __( 'http://wordpress.org/', 'fara' ) ); ?>" rel="nofollow"><?php printf( __( 'Proudly powered by %s', 'fara' ), 'WordPress' ); ?></a>
         <span class="sep"> | </span>
         <?php printf( __( 'Theme: %2$s by %1$s.', 'fara' ), 'JustFreeThemes', '<a href="http://justfreethemes.com/fara" rel="nofollow">Fara</a>' ); ?>
         <a href="#" class="scrolltop"><i class="fa fa-chevron-up"></i>&nbsp;<?php _e('Back to top ', 'fara'); ?></a>
      </div><!-- .site-info -->
   </footer><!-- #colophon -->
</div><!-- #page -->

<?php wp_footer(); ?>

</body>
</html>
Fino a qua è andato tutto bene.
Però non riesco a fare inserire i widget in orizzontale perchè me li inserisce in orizzontale...
quando ho registrato la sidebar nel file functions.php ho messo il div con classe foot_widget e gli ho assegnato nel foglio stile display:inline per cercare di allineare tutti i widget
Ma non è cambiato nulla. Me li inserisce lo stesso uno sotto l'altro.
Cosa posso fare? In cosa sto sbagliando?
PHP:
'before_widget' => '<div  class="foot_widget">',
        'after_widget'  => '</div>',
 

Discussioni simili