WordPress.org

Ready to get started?Download WordPress

Forums

WP Super Cache
[closed] Post listing outside of WordPress install not working (2 posts)

  1. ajmaxwell
    Member
    Posted 1 year ago #

    Hi everyone,

    I recently install WP Super Cache and got it set up and running perfectly, except for 1 part. On the Home Page of my site I have PHP retrieving the 5 latest posts, it works well when Super Cache is off, but when it's on it returns a bunch of random characters and breaks the whole page.

    Home Page code

    <?php
    						require('blog/wp-load.php');
    						query_posts('showposts=5'); ?>
    					<ul>
    						<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    						<li><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></li>
    						<?php endwhile; else: echo "No posts... yet"; endif; ?>
    					</ul>
    					<?php wp_reset_query(); ?>

    I have tried the following lines in "Accepted Filenames & Rejected URIs" (this is based off a post I found after some Googling)

    wp-.*\.php
    index\.php
    ^/$
    /$
    ^example.com/$
    ^example.com$

    Any help would is greatly appreciated.

    Thanks

    http://wordpress.org/extend/plugins/wp-super-cache/

  2. ajmaxwell
    Member
    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic