WordPress.org

Ready to get started?Download WordPress

Forums

WP Super Cache
Minimal page templates aren't cached (3 posts)

  1. Misamee
    Member
    Posted 2 years ago #

    I have a very simple and minimal page template called contentsonly.php.
    I use this template when I need contents only data (for instance, with wp-filebase, to generate an xml of audio files, that then I give to a flash player).

    This is the content of the template:

    <?php
    /*
    Template Name: Contents Only
    */
    
    add_filter( 'hybrid_entry_meta', 'nometa' );
    function nometa( $meta ) {
    	return '';
    }
    
    if ( have_posts() ) {
    	while ( have_posts() ) {
    		the_post();
    		//do_atomic( 'before_entry' ); // hybrid_before_entry
    		the_content();
    		do_atomic( 'after_entry' ); // hybrid_after_entry
    	}
    }
    ?>

    Pages built with this page template aren't cached: what should I do to cache them?

  2. Donncha O Caoimh
    Member
    Plugin Author

    Posted 2 years ago #

    Make sure there's a closing html tag. That should do the job. If not, enable debugging in the plugin and that will reveal why.

  3. Misamee
    Member
    Posted 2 years ago #

    Yes, definitely is the missing html tag, but I can't add it, as I need this page template for contents only (without any html tag, unless is in the contents).

    In the specific case, I'm serving an XML file: http://progettoanike.org/xml-africa-dentro-afrika-accono/

    I just can't add the html tag.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic