WordPress : obtenir une erreur dans la page d’en-tête
j’obtiendrai une erreur ceci
Fatal error: Call to undefined function gdlr_print_header_social() in /home2/u9447441/public_html/wp-content/themes/clevercourse-v1-27/header.php on line 63
et à la ligne 63 le code est celui-ci
<?php gdlr_print_header_social(); ?>
et ceci est le code de la page entière de hearer.php
<!DOCTYPE html>
<!--[if IE 7]><html class="ie ie7 ltie8 ltie9" <?php language_attributes(); ?>><![endif]-->
<!--[if IE 8]><html class="ie ie8 ltie9" <?php language_attributes(); ?>><![endif]-->
<!--[if !(IE 7) | !(IE 8) ]><!-->
<html <?php language_attributes(); ?>>
<!--<![endif]-->
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="initial-scale = 1.0" />
<title><?php bloginfo('name'); ?> <?php wp_title(); ?></title>
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php
global $theme_option, $gdlr_post_option;
if( !empty($gdlr_post_option) ){ $gdlr_post_option = json_decode($gdlr_post_option, true); }
wp_head();
?>
</head>
<body <?php body_class(); ?>>
<?php
$body_wrapper = '';
if($theme_option['enable-boxed-style'] == 'boxed-style'){
$body_wrapper = 'gdlr-boxed-style';
if( !empty($theme_option['boxed-background-image']) && is_numeric($theme_option['boxed-background-image']) ){
$alt_text = get_post_meta($theme_option['boxed-background-image'] , '_wp_attachment_image_alt', true);
$image_src = wp_get_attachment_image_src($theme_option['boxed-background-image'], 'full');
echo '<img class="gdlr-full-boxed-background" src="' . $image_src[0] . '" alt="' . $alt_text . '" />';
}else if( !empty($theme_option['boxed-background-image']) ){
echo '<img class="gdlr-full-boxed-background" src="' . $theme_option['boxed-background-image'] . '" />';
}
}
$body_wrapper .= ($theme_option['enable-float-menu'] != 'disable')? ' float-menu': '';
?>
<div class="body-wrapper <?php echo $body_wrapper; ?>" data-home="<?php echo home_url(); ?>" >
<?php
// page style
if( empty($gdlr_post_option) || empty($gdlr_post_option['page-style']) ||
$gdlr_post_option['page-style'] == 'normal' ||
$gdlr_post_option['page-style'] == 'no-footer'){
?>
<header class="gdlr-header-wrapper">
<!-- top navigation -->
<img src="http://google.com/wp-content/uploads/2017/09/9.png" style="display:block; margin-left:auto;
margin-right:auto; margin-top:10px;"/>
<hr />
<?php if( empty($theme_option['enable-top-bar']) || $theme_option['enable-top-bar'] == 'enable' ){ ?>
<div class="top-navigation-wrapper">
<div class="top-navigation-container container">
<div class="top-navigation-left">
<div class="top-navigation-left-text">
<?php
if( !empty($theme_option['top-bar-right-text']) )
echo gdlr_text_filter($theme_option['top-bar-right-text']);
?>
</div>
</div>
<div class="top-navigation-right">
<div class="top-social-wrapper">
<?php gdlr_print_header_social(); ?>
<div style="display: inline-block; *display: inline; *zoom:1; font-size:12px;">
<img src="http://google.com/wp-content/uploads/2017/09/6.png" /> info@google.com
</div>
</div>
<div class="clear"></div>
</div>
<div class="clear"></div>
</div>
<br />
</div>
<?php } ?>
<!-- logo -->
<div class="gdlr-header-inner">
<div class="gdlr-header-container container">
<!-- logo -->
<div class="gdlr-logo">
<a href="<?php echo home_url(); ?>" >
<?php
if(empty($theme_option['logo-id'])){
echo gdlr_get_image(GDLR_PATH . '/images/logo.png');
}else{
echo gdlr_get_image($theme_option['logo-id']);
}
?>
</a>
<?php
// mobile navigation
if( class_exists('gdlr_dlmenu_walker') && has_nav_menu('main_menu') &&
( empty($theme_option['enable-responsive-mode']) || $theme_option['enable-responsive-mode'] == 'enable' ) ){
echo '<div class="gdlr-responsive-navigation dl-menuwrapper" id="gdlr-responsive-navigation" >';
echo '<button class="dl-trigger">Open Menu</button>';
wp_nav_menu( array(
'theme_location'=>'main_menu',
'container'=> '',
'menu_class'=> 'dl-menu gdlr-main-mobile-menu',
'walker'=> new gdlr_dlmenu_walker()
) );
echo '</div>';
}
?>
</div>
<!-- navigation -->
<?php get_template_part( 'header', 'nav' ); ?>
<div class="clear"></div>
</div>
</div>
<div class="clear"></div>
</header>
<div id="gdlr-header-substitute" ></div>
<div class="gdlr-nav-search-form" id="gdlr-nav-search-form">
<div class="gdlr-nav-search-container container">
<form method="get" action="<?php echo home_url(); ?>">
<i class="fa fa-search icon-search"></i>
<input type="submit" id="searchsubmit" class="style-2" value="">
<div class="search-text" id="search-text">
<input type="text" value="" name="s" id="s" autocomplete="off" data-default="<?php _e("Type keywords..." , "gdlr_translate"); ?>" >
</div>
<div class="clear"></div>
</form>
</div>
</div>
<?php get_template_part( 'header', 'title' );
} // page style ?>
<div class="content-wrapper">
s’il vous plaît aidez-moi comment je slove je n’ai pas compris
Solution n°1 trouvée
La simple suppression de cette ligne et de cette fonction supprimera l’erreur fatale et affichera la page.
Malheureusement, quelle que soit cette fonction, elle n’est définie ni dans un plugin ni dans votre fichier functions.php et ne sera pas rendue.
Si vous avez effectué une recherche et un remplacement pour gdlr_ dans votre fichier pour renommer les noms de fonction et les noms de classe, vous devrez peut-être faire de même pour votre fichier functions.php.
0 commentaire