• Hi there! I’m relatively new to WordPress but have worked with it a little. I’m setting up a site at directoryscriptreviews.com using a template that is based on the Kubrick theme. In setting up a static front page, I’ve selected the “home” template however the site refuses to display the home page. I get this error message:

    Fatal error: Call to undefined function meta() in /home/kathee/directoryscriptreviews.com/wp-content/themes/productreview/home.php on line 34

    This is the code on line 34:

    <td width=”477″ valign=”top”><img align=”left” src=”<?php bloginfo(‘stylesheet_directory’); ?>/images/<?php meta(‘p_image’); ?>” style=”margin: 10px” />“><b><?php the_title(); ?></b>
    <img src=”<?php bloginfo(‘stylesheet_directory’); ?>/images/<?php meta(‘p_rating’); ?>.jpg” />

    <?php the_content(); ?></td>

    I do not know enough to spot what is wrong here – can anyone help?

    Thank you so much,
    Kathee

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator James Huff

    (@macmanx)

    Did you select it at Appearance/Editor in the admin panel, or are you trying to load it in your browser directly?

    Thread Starter Kathee

    (@kathee)

    Hi- thanks for taking time to help! I’m not sure I understand the questions, but the page “home.php” loads fine in Appearance/Editor but does not load into the browser. I copied the code from an ftp page that gives the line count. Did I answer your question?
    Thanks again – I really appreciate your help.

    Moderator James Huff

    (@macmanx)

    In that case, the error is normal.

    It won’t load in a browser because it’s a theme template, not a standard page. All of the PHP functions in the template are designed to be called from the blog directory when the template is loaded as part of an overall theme.

    Thread Starter Kathee

    (@kathee)

    Thanks for that observation. What do I do to correct it, please?

    Moderator James Huff

    (@macmanx)

    You don’t “correct it” because you shouldn’t be visiting the template directly. You’ll have to call the template from somewhere within the theme so that it’s executed when the blog is viewed. Please review the documentation here:

    http://codex.wordpress.org/Theme_Development

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Fatal error in home.php’ is closed to new replies.