WordPress.org

Ready to get started?Download WordPress

Forums

"Call to undefined function" though using wp-blog-header (1 post)

  1. eternaute
    Member
    Posted 6 years ago #

    Hello,

    I thought I was trying to implement a very simple static page but couldn't make it work. Duh...

    I keep getting the error message "Call to undefined function...".

    I browsed the support forum and according to specialists the best way to have a static page using WP functions is to add a require to wp-blog-header.php. Which I did :

    <html>
    <head>
    <title>
    Mysite
    </title>
    <link rel="stylesheet" href="http://mysite.com/wordpress/wp-content/themes/mytheme/style.css" type="text/css" media="screen" />
    </head>
    <body>
    <?php define('WP_USE_THEMES', false);
    require('http://mysite.com/wordpress/wp-blog-header.php');
    bloginfo('name');
    ?>
    
    </body>
    </html>

    I also added a line before endif in wp-blog-header.php to verify whether it was loaded or not:
    echo "include blog-header done!";

    But I only get this frustrating message on my page:

    include blog-header done!
    Fatal error: Call to undefined function: bloginfo() in http://mysite.com/wordpress/wp-content/themes/mytheme/test.php on line 12

    What did I miss?
    Thanks for any cue or comment that would send me on the right path... :)

Topic Closed

This topic has been closed to new replies.

About this Topic