Help please? (7 posts)

  1. Rikkucute
    Posted 10 years ago #

    I just switched over to 1.5 and everything was going great until I realized I had a comment error. It said I was missing wp-comment-review.php. I uploaded that and tried to use it and I got a fatal error, so I decided to update my theme index to the newer one provided by the "default" theme index file...so I modified it so I could skin the index and I got this error:

    Fatal error: Call to undefined function: have_posts() in /home/aloha/public_html/test.php on line 5

    On line five, I have this piece of coding: <?php if (have_posts()) : ?>

    Right now, I'm working with a test page http://alohamora.org/test.php Can anyone help? :T

  2. Kafkaesqui

    Posted 10 years ago #

    What are the first four lines of test.php? In other words, is this there:


  3. Rikkucute
    Posted 10 years ago #

    <?php include ("/home/aloha/public_html/skins/cookiecheck.php");?>
    <? include($headervar.$extension); ?>
    <div id="content" class="narrowcolumn">

    Line 4 is empty

  4. Kafkaesqui

    Posted 10 years ago #

    The point is the error says you're calling have_posts() on line 5, and have_posts() is a WordPress function. You have to first include wp-blog-header.php for your page's scripting to know about WordPress.

  5. Rikkucute
    Posted 10 years ago #

    So I should add the piece of coding that you have up above? The wp-blog-header.php? =T

  6. Kafkaesqui

    Posted 10 years ago #

    Yep. If wp-blog-header.php is in the same directory, any WP functions in your template should then work by providing the require to it.

  7. Rikkucute
    Posted 10 years ago #

    Nevermind, I added it--all appears to be fixed, thank you *SO* much!

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.