WordPress.org

Ready to get started?Download WordPress

Forums

have_posts() false return upon upgrade to 2.2 (2 posts)

  1. coastal593
    Member
    Posted 6 years ago #

    upgraded from 1.5.X (yes, very old, i know), and a simple wp-print.php -type script no longer works because have_posts() returns false.

    permalink structure:
    /archives/category/monthnum/name/

    rewrite rule:
    RewriteRule ^archives/([_0-9a-z-]+)/([0-9]{1,2})/([_0-9a-z-]+)/print/?$ /admin/print.php?category_name=$1&monthnum=$2&name=$3&feed=$4 [QSA,L]

    pretty simple code:
    <?php
    require('wp-blog-header.php');
    ?>
    <html>
    <head>
    <title><?php bloginfo('name')?> > Print > <?php echo single_post_title('')?></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <style type="text/css">

    ... SOME CSS ... THEN ...

    <?php if (have_posts()): ?>
    <?php while (have_posts()): the_post(); ?>

    so here <?if (have_posts()): ?> returns false immediately. seems quite simple to me but i can't seem to fix it. any help is appreciated.

  2. steegness
    Member
    Posted 6 years ago #

    I am experiencing the same problem, and would love to know if others are having the same issue.

    Interestingly, the problem seems to be intermittent; it appeared today for about 15 minutes, was fine for most of the day, and has reappeared now (as of the time of this reply).

Topic Closed

This topic has been closed to new replies.

About this Topic