<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Adding custom columns to the WordPress manage posts screen</title>
	<atom:link href="http://scompt.com/archives/2007/10/20/adding-custom-columns-to-the-wordpress-manage-posts-screen/feed" rel="self" type="application/rss+xml" />
	<link>http://scompt.com/archives/2007/10/20/adding-custom-columns-to-the-wordpress-manage-posts-screen</link>
	<description>The website of Edward Dale</description>
	<pubDate>Thu, 24 Jul 2008 00:33:13 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Hugh Todd</title>
		<link>http://scompt.com/archives/2007/10/20/adding-custom-columns-to-the-wordpress-manage-posts-screen#comment-1263</link>
		<dc:creator>Hugh Todd</dc:creator>
		<pubDate>Thu, 21 Feb 2008 08:36:07 +0000</pubDate>
		<guid isPermaLink="false">http://scompt.com/archives/2007/10/20/adding-custom-columns-to-the-wordpress-manage-posts-screen#comment-1263</guid>
		<description>Ah, excellent. I'll keep an eye out for future pearls. Very, very helpfut, thanks.</description>
		<content:encoded><![CDATA[<p>Ah, excellent. I&#8217;ll keep an eye out for future pearls. Very, very helpfut, thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: scompt</title>
		<link>http://scompt.com/archives/2007/10/20/adding-custom-columns-to-the-wordpress-manage-posts-screen#comment-1259</link>
		<dc:creator>scompt</dc:creator>
		<pubDate>Wed, 20 Feb 2008 13:49:10 +0000</pubDate>
		<guid isPermaLink="false">http://scompt.com/archives/2007/10/20/adding-custom-columns-to-the-wordpress-manage-posts-screen#comment-1259</guid>
		<description>There are indeed some hooks to allow further filters, but their use is a bit more complicated.  Maybe I'll write up a blog post about them sometime soon.  The big one you'll want to look at is &lt;pre&gt;restrict_manage_posts&lt;/pre&gt;.</description>
		<content:encoded><![CDATA[<p>There are indeed some hooks to allow further filters, but their use is a bit more complicated.  Maybe I&#8217;ll write up a blog post about them sometime soon.  The big one you&#8217;ll want to look at is
<pre>restrict_manage_posts</pre>
<p>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hugh Todd</title>
		<link>http://scompt.com/archives/2007/10/20/adding-custom-columns-to-the-wordpress-manage-posts-screen#comment-1258</link>
		<dc:creator>Hugh Todd</dc:creator>
		<pubDate>Tue, 19 Feb 2008 23:08:41 +0000</pubDate>
		<guid isPermaLink="false">http://scompt.com/archives/2007/10/20/adding-custom-columns-to-the-wordpress-manage-posts-screen#comment-1258</guid>
		<description>On the Manage &#62; Posts page, in WP 2.3, there's a search function, allowing filtering by string, status, author, month and category. Are there any hooks to allow further filters? By ID, for example, or by whatever has been added to a custom column (in this case reference numbers)?</description>
		<content:encoded><![CDATA[<p>On the Manage &gt; Posts page, in WP 2.3, there&#8217;s a search function, allowing filtering by string, status, author, month and category. Are there any hooks to allow further filters? By ID, for example, or by whatever has been added to a custom column (in this case reference numbers)?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: scompt</title>
		<link>http://scompt.com/archives/2007/10/20/adding-custom-columns-to-the-wordpress-manage-posts-screen#comment-1256</link>
		<dc:creator>scompt</dc:creator>
		<pubDate>Tue, 19 Feb 2008 07:53:13 +0000</pubDate>
		<guid isPermaLink="false">http://scompt.com/archives/2007/10/20/adding-custom-columns-to-the-wordpress-manage-posts-screen#comment-1256</guid>
		<description>I don't understand what you mean.  What exactly are you looking to do?</description>
		<content:encoded><![CDATA[<p>I don&#8217;t understand what you mean.  What exactly are you looking to do?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hugh Todd</title>
		<link>http://scompt.com/archives/2007/10/20/adding-custom-columns-to-the-wordpress-manage-posts-screen#comment-1255</link>
		<dc:creator>Hugh Todd</dc:creator>
		<pubDate>Mon, 18 Feb 2008 22:20:07 +0000</pubDate>
		<guid isPermaLink="false">http://scompt.com/archives/2007/10/20/adding-custom-columns-to-the-wordpress-manage-posts-screen#comment-1255</guid>
		<description>Edward, that's perfect. Many thanks. It's up and running.

Now (there's always more, isn't there?) is it possible to add a filter for this custom column, I wonder?</description>
		<content:encoded><![CDATA[<p>Edward, that&#8217;s perfect. Many thanks. It&#8217;s up and running.</p>
<p>Now (there&#8217;s always more, isn&#8217;t there?) is it possible to add a filter for this custom column, I wonder?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: scompt</title>
		<link>http://scompt.com/archives/2007/10/20/adding-custom-columns-to-the-wordpress-manage-posts-screen#comment-1253</link>
		<dc:creator>scompt</dc:creator>
		<pubDate>Mon, 18 Feb 2008 11:05:06 +0000</pubDate>
		<guid isPermaLink="false">http://scompt.com/archives/2007/10/20/adding-custom-columns-to-the-wordpress-manage-posts-screen#comment-1253</guid>
		<description>Hi Hugh,

You'll probably need something like this:

&lt;pre&gt;&lt;code&gt;add_filter('manage_posts_columns', 'todd_columns');
add_action('manage_posts_custom_column', 'todd_custom_column', 10, 2);

function todd_columns($defaults) {
    $defaults['custom_field'] = 'My Custom Field';
    return $defaults;
}

function todd_custom_column($column_name, $post_id) {
    global $wpdb;
    if( $column_name == 'custom_field' ) {
	echo get_post_meta($post_id, 'Ref', true);
    }
}&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Hi Hugh,</p>
<p>You&#8217;ll probably need something like this:</p>
<pre><code>add_filter('manage_posts_columns', 'todd_columns');
add_action('manage_posts_custom_column', 'todd_custom_column', 10, 2);

function todd_columns($defaults) {
    $defaults['custom_field'] = &#8216;My Custom Field&#8217;;
    return $defaults;
}

function todd_custom_column($column_name, $post_id) {
    global $wpdb;
    if( $column_name == &#8216;custom_field&#8217; ) {
	echo get_post_meta($post_id, &#8216;Ref&#8217;, true);
    }
}</code></pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hugh Todd</title>
		<link>http://scompt.com/archives/2007/10/20/adding-custom-columns-to-the-wordpress-manage-posts-screen#comment-1252</link>
		<dc:creator>Hugh Todd</dc:creator>
		<pubDate>Mon, 18 Feb 2008 10:42:35 +0000</pubDate>
		<guid isPermaLink="false">http://scompt.com/archives/2007/10/20/adding-custom-columns-to-the-wordpress-manage-posts-screen#comment-1252</guid>
		<description>This looks wonderful, and I've got started by using Hello Dolly. But I have hit a wall and need help.

The new column is created, but I can't for the life of me work out how to add the particular data I'd like to put in the new column. And here's where my almost total lack of coding knowledge is exposed.

What I'd like to add to the column is the data from each Post's single Custom Field. What code would I need to use to achieve this? (The Key for the custom field is "Ref", and the Value is an alphanumeric string.)

Any help with this would be appreciated enormously.</description>
		<content:encoded><![CDATA[<p>This looks wonderful, and I&#8217;ve got started by using Hello Dolly. But I have hit a wall and need help.</p>
<p>The new column is created, but I can&#8217;t for the life of me work out how to add the particular data I&#8217;d like to put in the new column. And here&#8217;s where my almost total lack of coding knowledge is exposed.</p>
<p>What I&#8217;d like to add to the column is the data from each Post&#8217;s single Custom Field. What code would I need to use to achieve this? (The Key for the custom field is &#8220;Ref&#8221;, and the Value is an alphanumeric string.)</p>
<p>Any help with this would be appreciated enormously.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jeremy clarke</title>
		<link>http://scompt.com/archives/2007/10/20/adding-custom-columns-to-the-wordpress-manage-posts-screen#comment-1084</link>
		<dc:creator>jeremy clarke</dc:creator>
		<pubDate>Fri, 18 Jan 2008 18:46:57 +0000</pubDate>
		<guid isPermaLink="false">http://scompt.com/archives/2007/10/20/adding-custom-columns-to-the-wordpress-manage-posts-screen#comment-1084</guid>
		<description>Thanks for writing this man. Great article and very useful for all kinds of things. This should be in the codex somewhere... I don't know why it doesn't have a system for adding a detail page for each hook and how to use it, the descriptions there are almost always not useful...

Just added it as a link to this page after the short descriptions on the filter and action listing pages. 

Thanks!</description>
		<content:encoded><![CDATA[<p>Thanks for writing this man. Great article and very useful for all kinds of things. This should be in the codex somewhere&#8230; I don&#8217;t know why it doesn&#8217;t have a system for adding a detail page for each hook and how to use it, the descriptions there are almost always not useful&#8230;</p>
<p>Just added it as a link to this page after the short descriptions on the filter and action listing pages. </p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: josh b</title>
		<link>http://scompt.com/archives/2007/10/20/adding-custom-columns-to-the-wordpress-manage-posts-screen#comment-113</link>
		<dc:creator>josh b</dc:creator>
		<pubDate>Wed, 05 Dec 2007 18:34:25 +0000</pubDate>
		<guid isPermaLink="false">http://scompt.com/archives/2007/10/20/adding-custom-columns-to-the-wordpress-manage-posts-screen#comment-113</guid>
		<description>thank you so much for posting this.  I saw the filter and action but no documentation.</description>
		<content:encoded><![CDATA[<p>thank you so much for posting this.  I saw the filter and action but no documentation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: enthusiasm : archive : &#187; links for 2007-10-24</title>
		<link>http://scompt.com/archives/2007/10/20/adding-custom-columns-to-the-wordpress-manage-posts-screen#comment-17</link>
		<dc:creator>enthusiasm : archive : &#187; links for 2007-10-24</dc:creator>
		<pubDate>Wed, 24 Oct 2007 23:39:04 +0000</pubDate>
		<guid isPermaLink="false">http://scompt.com/archives/2007/10/20/adding-custom-columns-to-the-wordpress-manage-posts-screen#comment-17</guid>
		<description>[...] scompt.com » Adding custom columns to the WordPress manage posts screen Tutorial for adding columns to post management page in WordPress admin (tags: wordpress, dev, plugin) [...]</description>
		<content:encoded><![CDATA[<p>[...] scompt.com » Adding custom columns to the WordPress manage posts screen Tutorial for adding columns to post management page in WordPress admin (tags: wordpress, dev, plugin) [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
