WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Call to undefined function: bloginfo() (13 posts)

  1. redPARADE
    Member
    Posted 7 years ago #

    I'm DESPERATE. I've tried everything that I could think of to fix the problem and I went looking over topics which are similar but none of them really helped me.

    This fatal error kept me frustrated for i-don't-know-how-long. I did something, which I can't quite remember and now this error is gone.

    Fatal error: Call to undefined function: get_header() in /home/antislee/public_html/o-nature/wordpress/wp-content/themes/1/index.php on line 1

    HOWEVER, now, the real problem is this.

    Fatal error: Call to undefined function: bloginfo() in /home/antislee/public_html/o-nature/wordpress/wp-content/themes/2/header.php on line 7

    Please? Can something tell me what I did wrong and what I need to do in order to fix the problem? Thanks in advance=)

  2. Trent Adams
    Member
    Posted 7 years ago #

    This seems strange. What theme are you using? It would seem that the errors are called by themes called 1 and 2. Are they custom themes you created or just themes that you uploaded into those directories. It seems that you are trying to call funtions in 2 different themes.

    As it is a theme problem (hense both errors), you will have to open up the files that are being referenced in the error and see what it says on those lines.

    Trent

  3. redPARADE
    Member
    Posted 7 years ago #

    Oh. I'm sorry, i mistaken something on the first fatal error. Both errors are coming from the same theme which I named "2". It is a custom theme that I've created using the Default one as a model.

    The fatal error referred to this paragraph below.

    <title><?php bloginfo('header'); ?> <?php if ( is_single() ) { ?> » blog archive <?php } ?> <?php wp_title(); ?></title>

    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->

    <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'); ?>" />

  4. Ajd777
    Member
    Posted 7 years ago #

    There is no header option for bloginfo in either 2.0.x or 2.1.

  5. redPARADE
    Member
    Posted 7 years ago #

    Really? Are these lines important or I can just take them out? Do I need to replace them by something else? If yes, can you specify the codes?

    Thank you=)

  6. Doodlebee
    Member
    Posted 7 years ago #

    I'm not sure what you mean, exactly, Ajd..."bloginfo" is how the URL's are dynamically created. There certainly *is* a use for them.

    What your error looks like, red, is maybe you have WordPress in it's own folder, but you're pulling it up through to the root?

    Meaning, your wordpress files here here:

    /home/antislee/public_html/o-nature/wordpress/

    But your index.php file is actually residing here:

    /home/antislee/public_html/o-nature/

    Is this correct? If not, let me know.

  7. redPARADE
    Member
    Posted 7 years ago #

    No, I put my index.php file in the same folder as the others.

    The main issue here is now this one:

    'Fatal error: Call to undefined function: bloginfo() in /home/antislee/public_html/o-nature/wordpress/wp-content/themes/2/header.php on line 7'

    It has something to do with the function BLOGINFO.. but I don't know why? What's wrong with it?

    Thanks!

  8. redPARADE
    Member
    Posted 7 years ago #

    No, I put my index.php file in the same folder as the others.

    The main issue here is now this one:

    Fatal error: Call to undefined function: bloginfo() in /home/antislee/public_html/o-nature/wordpress/wp-content/themes/2/header.php on line 7

    It has something to do with the function BLOGINFO.. but I don't know why? What's wrong with it?

    Thanks!

  9. Ajd777
    Member
    Posted 7 years ago #

    @doodlebee: bloginfo is a function that retrieves options form the database. There is no option 'header';

    @redPARADE: Are you going directly to the url for the header? Because it seems to me that the rest of wordpress isn't loading. What happens if you just take bloginfo out?

  10. Doodlebee
    Member
    Posted 7 years ago #

    @doodlebee: bloginfo is a function that retrieves options form the database. There is no option 'header';

    I see what you're saying now...duh. I thought you were saying something else.

    I'd like to know what the top 10 lines of his header.php file says.

    But yea, Ajd's right - there is no option of "header" that goes into your "bloginfo" area.

  11. SteeL
    Member
    Posted 6 years ago #

    I have created my blog yesterday,
    everything was working fine, but today I certenly got this error after installing a new Theme, but that new theme was also working properly, but after 3-4hr's when i visited back to my BLOG, i got this error:

    Fatal error: Call to undefined function: bloginfo() in /usr/export/www/vhosts/funnetwork/hosting/ugfiles/header.php on line 5

    what to do, please tell me step-by-step how to solve it, I'm new to WordPress system.

    Thank You.

    My Header.php's top 22 lines are as follows :

    <!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/1">
    	<title><?php bloginfo('name'); ?></title>
    	<meta name="ROBOTS" content="INDEX,FOLLOW"/>
        <meta name="Title" content="<?php bloginfo('name'); ?>" />
    	<meta name="description" content="free downloads, freewares, files"/>
    	<meta name="abstract" content="One WordPress Blog."/>
    	<meta name="keywords" content="games,movies,softwares,free,free downloads"/>
    	<meta name="revisit-after" content="1 days"/>
    	<meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo('charset'); ?>" />
    	<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />
    	<style type="text/css" media="screen">@import url( <?php bloginfo('stylesheet_url'); ?> );</style>
    	<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
    	<link rel="alternate" type="application/rss+xml" title="Comments RSS 2.0" href="<?php bloginfo('comments_rss2_url'); ?>" />
    	<link rel="alternate" type="text/xml" title="RSS 0.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_get_archives('type=monthly&format=link'); ?>
    	<?php wp_head(); ?>
    </head>
  12. greeny
    Member
    Posted 6 years ago #

    hello,
    i am having the exact same problem as STeeL.

    can someone please advise how to correct this problem?
    'Fatal error: Call to undefined function: bloginfo() in /home/okamik/public_html/blog/header.php on line 5'

    i did not see the answer in any other forum.

    the code is:
    '<head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

    <title><?php bloginfo('name'); ?><?php wp_title(); ?></title>'

    i have a header.php in
    /public_html/blog/
    and
    /public_html/blog/wp-content/themes/daisy/

  13. Fahd Murtaza
    Member
    Posted 6 years ago #

    well the simple and easy answer! What you have accidentally done is

    You guys have uploaded your wordpress theme files in

    your-wordpress-folder-or-directory/

    but you had to upload your theme in

    your-wordpress-folder-or-directory/wp-content/themes/your-theme-folder/

    I hop you got the point!

Topic Closed

This topic has been closed to new replies.

About this Topic