Example Plugin

Here is an example of a sample plugin, that is quite functional.

We are using this plugin on this site!

Due to the amount of documentation being presented here, we wanted greater control over the markup of the static pages, but wanted to let WordPress retain the formatting capabilities for use in posts and comments.


<?php
/*
Plugin Name: No wpautop Pages
Plugin URI: http://wordpress28vqs.com/
Description: This removes the wpautop function for pages, but leaves it intact for posts.
Author: Matt Beck
Version: 1.0
Author URI: http://couldbestudios.com
*/

/* REMOVE WPAUTOP FOR PAGES */

function nowpautop($content){
if(is_page())
{
remove_filter('the_content','wpautop');
}
return $content;
}

add_action('loop_start','nowpautop');
?>

Download the No wpautop Pages plugin that we are using on this site.