While experimenting with wordpress i was tasked with a situation where i am suppose to present some static text content on the website. However uploading a text file was out of question and the author wanted to keep everything controlled inside wordpress.
So i created a simple text only theme template for him and this combined with the plugin allowing custom permalinks provide us with options of having a custom name and still showing the wordpress page as static text only page.
Template Page is available online at : https://github.com/anantshri/wordpress_tricks/blob/master/plain_text_page.php
Source Code for viewing pleasure.
* This templete will show all content as text only. in order to retain text only post while you save text in wordpress editor i would suggest add the text inside <pre></pre> tag
* the below code will remove any html / php tag that it will find in content and will only display the textual part of the file.
* Template Name: content text only
* Description: Only Post content text only
* @package WordPress
if (have_posts()) :
while (have_posts()) : the_post();
endwhile; // end of the loop.
P.S. I suspect there might be better ways of dealing with this situation but my limited google skills didn’t provided a result in first 5 minutes so instead i spend 2 minutes on crafting this. If you do know a better way then feel free to suggest it via comments.