Forums

Fatal error: undefined function blog info. (7 posts)

  1. Samuel F.
    Member
    Posted 1 year ago #

    Hi !

    I've got a well known problem.
    BUT IT'S NOT RESOLVED in any previous posts.

    i get a

    Fatal error: Call to undefined function bloginfo() in /homez.313/samuelfd/www/blog/wp-content/themes/creation_theme/header.php on line 5

    i'm actually doing a tutorial for medium skilled beginners in order to design my own template.

    and i'm stuck with this simple thing. don't really wanna go further until i've fixed it.

    this is my code wich contains line 5.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head profile="http://gmpg.org/xfn/11">
    
    	<title><?php bloginfo('name') ?><?php if ( is_404() ) : ?> &raquo; <?php _e('Not Found') ?><?php elseif ( is_home() ) : ?> &raquo; <?php bloginfo('description') ?><?php else : ?><?php wp_title() ?><?php endif ?></title>
    
    	<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    	<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />
    	<!-- leave this for stats -->
    	<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    	<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
    	<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
    	<link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />
    	<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" /><?php wp_head(); ?>
    
    	<?php wp_get_archives('type=monthly&format=link'); ?>
    	<?php //comments_popup_script(); // off by default ?>
    	<?php wp_head(); ?>
    
    </head>
    <body>
    <h1><?php bloginfo('name'); ?></h1>

    i'm simply trying to get the blog name.
    and i precise that my files are well placed in www/blog/wp-content/themes/creation_theme
    (my own theme folder is named creation_theme )

    Can someone help me please ?

    Thx a lot !

  2. mattyza
    Member
    Posted 1 year ago #

    Hi Samuel F.,
    Based on the Call to undefined function bloginfo() error you have received, it seems as though the file containing this function is either not present, incomplete (ie: it didn't finish uploading correctly) or is corrupt.

    The file containing this function is: wp-includes/general-template.php.

    I would recommend re-uploading a fresh copy of this file (from a freshly unzipped copy of the version of WordPress you are coding on) and see if this resolves the issue.

    I hope this helps. :)

    All the best,
    Matty.

  3. mattyza
    Member
    Posted 1 year ago #


  4. Samuel F.
    Member
    Posted 1 year ago #

    Ok i'll try that just now, see how it works and tell you about it.

    thx !

  5. Samuel F.
    Member
    Posted 1 year ago #

    God dam it !

    It's not working either...

    Grrr...

    Thx Matty'

    Anyone got another idea ? ( pleaaaase )

  6. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    <?php bloginfo('name') ?>

    how picky is php about the semicolon?

    <?php bloginfo('name'); >

  7. mattyza
    Member
    Posted 1 year ago #

    @RVoodoo PHP isn't too picky about the semi-colon. It's generally good to use them though. :)

    @Samuel F. Another option may be to replace the call to bloginfo() with echo get_bloginfo(). The bloginfo() function uses get_bloginfo() to retrieve the data you're querying for.

    If the bloginfo() function isn't present, it seems to me as if there is a file that isn't loading correctly in your WordPress installation. If general-template.php isn't the problem file, it would be the file that loads it in.

    Is it possible to update your installation with a freshly downloaded version of the latest version of WordPress? It is quite possible that a file didn't finish uploading properly or was missed when uploading via FTP.

    I hope this helps, Sam. :)

    All the best,
    Matty.

  8. Samuel F.
    Member
    Posted 1 year ago #

    Rhaaa... i'm damned.

    This was the only create your template tuto i found and it's not working...

    where is suppsed to be located the function get_bloginfo() ?

    Do you know some good tutos so i can finally create my own theme ?

Topic Closed

This topic has been closed to new replies.

About this Topic