• Hi,

    suppose I want to include the output of all pages after being processed by their template php files in index.php, how would I do this?

    Each page has extended data associated (via custom fields). These get “rendered” by their templatefilename.php. I want to include the result of these templatefilename.php s in my index.php.

    I’ve got

    $pages = get_pages();
    	foreach( $pages as $post ):
    		setup_postdata($post);
    		the_content();
    	endforeach;
    	wp_reset_postdata();

    but this does not give the content as processed by the associated php template file of $post, it delivers the content from the wp page wysisyg editor.

  • The topic ‘inserting a page "rendered" by its template php in index.php’ is closed to new replies.