WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Trouble with "The Loop" (11 posts)

  1. Anonymous
    Unregistered
    Posted 9 years ago #

    Hello again,
    After this post: http://wordpress.org/support/7/10018
    Thanks for the info. I have installed wordpress on my server and I really like the program. Problem is I have put "The Loop" into a test page and I am getting a MySQL error.
    Here is the code for page: http://www.wwconcerts.com/wordpress/test.php
    [code]
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>New Page 1</title>
    </head>
    <body>
    <table border="1" width="100%">
    <tr>
    <td> </td>
    <td><?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
    <?php the_date('','<h2>','</h2>'); ?>
    <div class="post">
    <h3 class="storytitle" id="post-<?php the_ID(); ?>">" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></h3>
    <div class="meta"><?php _e("Filed under:"); ?> <?php the_category() ?> — <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(); ?></div>
    <div class="storycontent">
    <?php the_content(); ?>
    </div>
    <div class="feedback">
    <?php wp_link_pages(); ?>
    <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
    </div>
    <!--
    <?php trackback_rdf(); ?>
    -->
    <?php include(ABSPATH . 'wp-comments.php'); ?>
    </div>
    <?php endforeach; else: ?>
    <?php _e('Sorry, no posts matched your criteria.'); ?>
    <?php endif; ?></td>
    <td> </td>
    </tr>
    </table>
    </body>
    </html>
    [/code]
    I'm getting error "Fatal error: Call to undefined function: _e() in /home/wwconc2/public_html/wordpress/test.php on line 38". Can anyone tell me what I'm doing wrong?

  2. Anonymous
    Unregistered
    Posted 9 years ago #

    have to include the blog-header for one.

  3. Anonymous
    Unregistered
    Posted 9 years ago #

    ?? http://www.wiki.wordpress.org/TheLoop . It doesn't mention anything about adding the header there?
    But.
    I tried including the header, and there is still an error.

  4. Mark (podz)
    Support Maven
    Posted 9 years ago #

    What version of wp ?

  5. Anonymous
    Unregistered
    Posted 9 years ago #

    v1.2

  6. Mark (podz)
    Support Maven
    Posted 9 years ago #

    The fact that is cannot find the function '_e' suggests that at least one key file is not being loaded.
    That error isn't an sql error, it's a basic program error caused by the above.

  7. Root
    Member
    Posted 9 years ago #

    Well it doesnt say it is a php page at all. So when the first function loads it blows up.

  8. Anonymous
    Unregistered
    Posted 9 years ago #

    Then what is the error?
    And what do you mean it doesn't say it is a php page? It's .php extension, there isn't any extra code needed for a php page.

  9. zadu
    Member
    Posted 9 years ago #

    You can make it much easier for people to help resolve this by taking your test.php file, saving it as test.phps and putting it in the same place as test.php. That way, people can see the actual PHP code and figure out why it's not working, instead of guessing.

  10. Anonymous
    Unregistered
    Posted 9 years ago #

    I posted the code in my first post of this thread. But I'll go ahead and change the file to .phps

  11. Anonymous
    Unregistered
    Posted 9 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags