I am a webmaster of a site which was made with WordPress. I don't know PHP. I changed PHP version from 5.6 to 7.2. Since this change, I have an error on my site :

Warning: Use of undefined constant bloginfo - assumed 'bloginfo' (this will throw an Error in a future version of PHP) in /homepages/44/d313626673/htdocs/fcq/wp-content/themes/athlete/header.php on line 20

I downloaded the file header.php from the site:

<div id="frame">
    <div id="description">
    <h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo; ?></a></h1>
    <p><?php bloginfo; ?></p>
    <div id="menu">
           <ul id="nav">
           <li><a href="<?php bloginfo('url'); ?>/">Accueil</a></li>
            <?php wp_list_pages('title_li=&depth=0&sort_column=menu_order&exclude=56'); ?>
    <div id="header"></div>

I don't know what the problem is. Can someone help me ?

New contributor
illuch is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

This is incorrect:

<?php bloginfo; ?>

bloginfo() is a function, so you need to use parentheses ():

<?php bloginfo(); ?>
  • Thank for your answer. With your help, i have solved my problem. – illuch Mar 16 at 23:01

Your Answer

illuch is a new contributor. Be nice, and check out our Code of Conduct.

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.