WordPress : page blanche vierge lors de la publication/mise à jour/changement d’option, etc.
salutations, j’ai un problème dans le thème je le fais après avoir testé le thème sur localhost je l’ai essayé sur un hôte: quand j’essaie de poster, mettre à jour, changer d’option j’ai une page blanche vierge
puis j’ai activé le mode de débogage, cela me donne ces erreurs
Notice: register_sidebar was called incorrectly. No id was set in the
arguments array for the "footer" sidebar. Defaulting to "sidebar-1".
Manually set the id to "sidebar-1" to silence this notice and keep existing
sidebar content. Please see Debugging in WordPress for more information.
(This message was added in version 4.2.0.) in
/home/ar4web/public_html/wordpress/wp-includes/functions.php on line 4139
Warning: Cannot modify header information - headers already sent by (output
started at /home/ar4web/public_html/wordpress/wp-
content/themes/ar4web/functions.php:1) in
/home/ar4web/public_html/wordpress/wp-
content/themes/ar4web/plugins/rf/ReduxCore/inc/class.redux_functions.php on
line 56
Warning: Cannot modify header information - headers already sent by (output
started at /home/ar4web/public_html/wordpress/wp-
content/themes/ar4web/functions.php:1) in
/home/ar4web/public_html/wordpress/wp-admin/post.php on line 197
Warning: Cannot modify header information - headers already sent by (output
started at /home/ar4web/public_html/wordpress/wp-
content/themes/ar4web/functions.php:1) in
/home/ar4web/public_html/wordpress/wp-includes/pluggable.php on line 1210
je ne sais même pas ce que je dois modifier dans mon funcotions.php
mes fonctions php sont :
<?
/* Start Footer Widget */
register_sidebar( array(
'name' => 'footer',
'before_widget' => '<div class="col-md-3 col-sm-6 footer-col">',
'after_widget' => '</div>',
'before_title' => '<div class="logofooter">',
'after_title' => '</div><ul class="footer-ul">',
) );
/* End Footer Widget */
/* Start Post Thumbnails */
add_theme_support( 'post-thumbnails' );
if ( function_exists( 'add_theme_support' ) ) {
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 200, 352, true );
}
/* End Post Thumbnails */
/* Start Theme Panel */
if ( !class_exists( 'ReduxFramework' ) && file_exists( dirname( __FILE__ ) . '/plugins/rf/ReduxCore/framework.php' ) ) {
require_once( dirname( __FILE__ ) . '/plugins/rf/ReduxCore/framework.php' );
}
if ( !isset( $redux_demo ) && file_exists( dirname( __FILE__ ) .
'/plugins/rf/sample/sample-config.php' ) ) {
require_once( dirname( __FILE__ ) . '/plugins/rf/sample/barebones-
config.php' );
}
/* End Theme Panel */
/* Start Menu */
function register_my_menu() {
register_nav_menu('header-menu',__( '????? ???' ));
}
add_action( 'init', 'register_my_menu' );
/* End Menu */
/* Start ACF */
// 1. customize ACF path
add_filter('acf/settings/path', 'my_acf_settings_path');
function my_acf_settings_path( $path ) {
// update path
$path = get_stylesheet_directory() . '/plugins/acf/';
// return
return $path;
}
// 2. customize ACF dir
add_filter('acf/settings/dir', 'my_acf_settings_dir');
function my_acf_settings_dir( $dir ) {
// update path
$dir = get_stylesheet_directory_uri() . '/plugins/acf/';
// return
return $dir;
}
// 3. Hide ACF field group menu item
add_filter('acf/settings/show_admin', '__return_false');
// 4. Include ACF
include_once( get_stylesheet_directory() . '/plugins/acf/acf.php' );
include_once( get_stylesheet_directory() . '/plugins/acf/panel.php' );
/* End ACF */
include_once( get_stylesheet_directory() . '/plugins/lwm/plugin.php');
?>
Solution n°1 trouvée
Votre fonction pour appeler la barre latérale « doit être appelée » et nécessite également un id
et doit être au format suivant :
add_action( 'widgets_init', 'your_custom_sidebar' );
function your_custom_sidebar() {
register_sidebar( array(
'name' => __( 'Footer Sidebar', 'your_theme_lang' ),
'id' => 'footer-sidebar',
'description' => __( 'Some description', 'your_theme_lang' ),
'before_widget' => '<div class="col-md-3 col-sm-6 footer-col">',
'after_widget' => '</div>',
'before_title' => '<div class="logofooter">',
'after_title' => '</div><ul class="footer-ul">',
) );
}
0 commentaire