<?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>Sameer Ahuja &#187; TextMate</title>
	<atom:link href="http://sameerahuja.com/blog/tags/textmate/feed/" rel="self" type="application/rss+xml" />
	<link>http://sameerahuja.com</link>
	<description></description>
	<lastBuildDate>Fri, 04 Feb 2011 13:23:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Editing WordPress pages using blogging tools</title>
		<link>http://sameerahuja.com/blog/editing-wordpress-pages/</link>
		<comments>http://sameerahuja.com/blog/editing-wordpress-pages/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 21:44:31 +0000</pubDate>
		<dc:creator>sameer</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[TextMate]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://sameerahuja.com/?p=56</guid>
		<description><![CDATA[I&#8217;m a heavy user of TextMate, and use the blogging bundle to create and edit posts. I&#8217;m also a heavy user of WordPress Pages that enable wordpress to be used as a CMS. The one issue that always bugs me with any new WordPress installation is that you cannot edit pages from XML-RPC blogging tools [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a heavy user of TextMate, and use the <a href="http://blog.macromates.com/2006/blogging-from-textmate/">blogging bundle</a> to create and edit posts. I&#8217;m also a heavy user of WordPress Pages that enable wordpress to be used as a CMS. The one issue that always bugs me with any new WordPress installation is that you cannot edit pages from XML-RPC blogging tools like TextMate, Ecto, Windows Live Writer and such. The only working solution I&#8217;ve found to the same is a <em>little</em> ugly: You&#8217;ll need to edit one of the core wordpress files. I wouldn&#8217;t do it if I didn&#8217;t love TextMate so much.</p>

<p><a href="http://maisonbisson.com/blog/post/10834/editing-wordpress-pages-via-xml-rpc/">This post</a> from Maison Bisson described the process of editing the files for a previous version. The good news is, for the latest WordPress releases (I&#8217;ve checked 2.7.0 and 2.7.1), the data model has been changed to remove the &#8220;static&#8221; post status for pages (They now have the same status codes as posts), which means that no changes are required to the update fundtion; and a field called post_type now stores information about the kind of post (blog post, page, attachment).</p>

<p>So, essentially, here&#8217;s all you need to do to magically get the list of latest posts AND pages on your blogging client:</p>

<p>Modify this query in <code>wp_includes/post.php</code>:
<pre class="brush: php;"> $sql = &amp;quot;SELECT * FROM $wpdb-&amp;gt;posts WHERE post_type = 'post' ORDER BY post_date DESC $limit&amp;quot;;</pre></p>

<p>to this:</p>

<p><pre class="brush: php;"> $sql = &amp;quot;SELECT * FROM $wpdb-&amp;gt;posts WHERE post_type = 'post' OR post_type = 'page' ORDER BY post_date DESC $limit&amp;quot;;</pre></p>

<p>This is a scotch-tape solution that&#8217;s worked well for me so far. Try it at your own risk. Also, remember that when you update your WordPress installation, these changes might get overwritten.</p>

<p><strong>UPDATE</strong>: This works for 2.9.1 too, see comments below.</p>
]]></content:encoded>
			<wfw:commentRss>http://sameerahuja.com/blog/editing-wordpress-pages/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 12/15 queries in 0.023 seconds using disk

Served from: sameerahuja.com @ 2012-02-06 00:18:58 -->
