mat8iou
Member
Posted 6 years ago #
Waited too long to edit my previous post.
I've tried a couple of different ways of making it work better with 1.5 - one was to add <?php require('wp-blog-header.php'); ?> to the start of the file, which meant that I could then use <?php get_header(); ?> etc to draw the header & footer & sidebar.
The other thing I tried was using the phpexec plugin to paste the narchives code onto a page - however, the problem that arose with both of these was that it stopped showing all of the posts, & only shows about 10 now.
Thanks, I've put that into the script.
The TEMPLATEPATH, that is.
mat8iou
Member
Posted 6 years ago #
I still don't quite get why it doesn't work properly when ' <?php require('wp-blog-header.php'); ?>' is included at the start, as I would have thought that this would be the preferred way to set it up.
I saw another post somewhere that implied that the person was having the same problem as a result of that as I was.
I guess it's probably something simple like a single variable that neds to be over-ridden at the start of the script, but I've no idea where to start working out what it is.
There seem to be quite a few versions of the narchives.php file floating about on different sites, none of which seem to be quite the same.
Thanks to all for the tips and code. I'd been getting a blank page on narchives for 1.3 (on a 1.5 template-driven site). This finally seemed to work:
The narchives2.php should be uploaded to the blog root directory.
<?php require('wp-blog-header.php'); ?>
<?php require('wp-config.php'); $single = 1; $siteurl = get_settings('siteurl'); ?>
<?php include (TEMPLATEPATH . "/header.php"); ?>
THE REST OF THE NARCHIVES FILE HERE
<?php include (TEMPLATEPATH . "/sidebar.php"); ?>
<?php include (TEMPLATEPATH . "/footer.php"); ?>