<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Paul Bain &#187; Wordpress</title>
	<atom:link href="http://www.paulbain.com/articles/tag/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.paulbain.com</link>
	<description>Web Specialist</description>
	<lastBuildDate>Thu, 05 Nov 2009 20:54:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Inserting Default Content into the Wordpress Visual Editor</title>
		<link>http://www.paulbain.com/articles/inserting-default-content-into-wordpress-visual-editor/</link>
		<comments>http://www.paulbain.com/articles/inserting-default-content-into-wordpress-visual-editor/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 22:20:25 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[PHP Development]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.paulbain.com/?p=112</guid>
		<description><![CDATA[I&#8217;ve been working on a Wordpress layout which needs two columns of user editable content per page. There are many ways you could do this with Wordpress, however to make it as easy as possible for the content editors I though it would be easier if the visual editor had some default layout information inserted [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on a Wordpress layout which needs two columns of user editable content per page. There are many ways you could do this with Wordpress, however to make it as easy as possible for the content editors I though it would be easier if the visual editor had some default layout information inserted when creating a post.</p>
<p><img class="aligncenter size-full wp-image-117" title="2772835176_b15688669a_b" src="http://www.paulbain.com/wp-content/uploads/2009/10/2772835176_b15688669a_b.jpg" alt="2772835176_b15688669a_b" width="620" height="298" /></p>
<p>I knew there must be an easy way to do this using the action API in Wordpress and I came across <a href="http://www.wprecipes.com/how-to-automatically-insert-text-in-wordpress-editor">this article</a> by WPRecipies which suggests putting the following code in the functions.php of your theme:</p>
<p><code>add_filter( 'default_content', 'my_editor_content' );<br />
function my_editor_content( $content ) {<br />
$content = "If you enjoyed this post, make sure to subscribe to my rss feed.";<br />
return $content;<br />
}</code></p>
<p>I inserted a couple of divs for the columns into mine so I also wanted to add some basic styling to the editor. I know this probably isn&#8217;t the best way and I&#8217;m sure someone will correct me, but I just added the style to the end of the TinyMCE stylesheet which can be found here in /wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css</p>
<p><em>Photo credit: <a href="http://www.flickr.com/photos/adactio/2772835176/">adactio</a></em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.paulbain.com/articles/inserting-default-content-into-wordpress-visual-editor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
