have_posts() false return upon upgrade to 2.2
-
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.
- The topic ‘have_posts() false return upon upgrade to 2.2’ is closed to new replies.